The first great Three Rings renaming. Cocktail changed to Narya, Cher

changed to Presents and Party changed to Crowd. Whee!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@431 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2001-10-11 04:07:54 +00:00
parent ac477756ea
commit 8a4c46badc
170 changed files with 832 additions and 805 deletions
+4 -4
View File
@@ -1,16 +1,16 @@
//
// $Id: Log.java,v 1.4 2001/07/20 23:23:50 mdb Exp $
// $Id: Log.java,v 1.5 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher;
package com.threerings.presents;
/**
* A placeholder class that contains a reference to the log object used by
* the Cher services.
* the Presents services.
*/
public class Log
{
public static com.samskivert.util.Log log =
new com.samskivert.util.Log("cocktail.cher");
new com.samskivert.util.Log("presents");
/** Convenience function. */
public static void debug (String message)
@@ -1,16 +1,16 @@
//
// $Id: Client.java,v 1.16 2001/10/09 18:17:33 mdb Exp $
// $Id: Client.java,v 1.17 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.client;
package com.threerings.presents.client;
import java.util.ArrayList;
import java.util.List;
import com.threerings.cocktail.cher.Log;
import com.threerings.cocktail.cher.data.ClientObject;
import com.threerings.cocktail.cher.dobj.DObjectManager;
import com.threerings.cocktail.cher.net.BootstrapData;
import com.threerings.cocktail.cher.net.Credentials;
import com.threerings.presents.Log;
import com.threerings.presents.data.ClientObject;
import com.threerings.presents.dobj.DObjectManager;
import com.threerings.presents.net.BootstrapData;
import com.threerings.presents.net.Credentials;
/**
* Through the client object, a connection to the system is established
@@ -1,7 +1,7 @@
//
// $Id: ClientAdapter.java,v 1.2 2001/09/13 19:08:21 mdb Exp $
// $Id: ClientAdapter.java,v 1.3 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.client;
package com.threerings.presents.client;
/**
* The client adapter makes life easier for client observer classes that
@@ -1,15 +1,15 @@
//
// $Id: ClientDObjectMgr.java,v 1.6 2001/09/17 05:18:20 mdb Exp $
// $Id: ClientDObjectMgr.java,v 1.7 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.client;
package com.threerings.presents.client;
import java.util.ArrayList;
import com.samskivert.util.HashIntMap;
import com.samskivert.util.Queue;
import com.threerings.cocktail.cher.Log;
import com.threerings.cocktail.cher.dobj.*;
import com.threerings.cocktail.cher.net.*;
import com.threerings.presents.Log;
import com.threerings.presents.dobj.*;
import com.threerings.presents.net.*;
/**
* The client distributed object manager manages a set of proxy objects
@@ -1,7 +1,7 @@
//
// $Id: ClientObserver.java,v 1.2 2001/05/30 23:58:31 mdb Exp $
// $Id: ClientObserver.java,v 1.3 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.client;
package com.threerings.presents.client;
/**
* A client observer is registered with the client instance to be notified
@@ -1,7 +1,7 @@
//
// $Id: Communicator.java,v 1.15 2001/10/03 03:39:39 mdb Exp $
// $Id: Communicator.java,v 1.16 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.client;
package com.threerings.presents.client;
import java.io.*;
import java.net.Socket;
@@ -10,11 +10,11 @@ import java.net.InetAddress;
import com.samskivert.util.LoopingThread;
import com.samskivert.util.Queue;
import com.threerings.cocktail.cher.Log;
import com.threerings.cocktail.cher.dobj.DObjectManager;
import com.threerings.cocktail.cher.io.*;
import com.threerings.cocktail.cher.io.ObjectStreamException;
import com.threerings.cocktail.cher.net.*;
import com.threerings.presents.Log;
import com.threerings.presents.dobj.DObjectManager;
import com.threerings.presents.io.*;
import com.threerings.presents.io.ObjectStreamException;
import com.threerings.presents.net.*;
/**
* The client performs all network I/O on separate threads (one for
@@ -1,7 +1,7 @@
//
// $Id: InvocationCodes.java,v 1.1 2001/10/01 22:14:54 mdb Exp $
// $Id: InvocationCodes.java,v 1.2 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.client;
package com.threerings.presents.client;
/**
* The invocation codes interface provides codes that are commonly used by
@@ -1,7 +1,7 @@
//
// $Id: InvocationDirector.java,v 1.12 2001/10/04 20:02:13 mdb Exp $
// $Id: InvocationDirector.java,v 1.13 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.client;
package com.threerings.presents.client;
import java.lang.reflect.Method;
import java.util.HashMap;
@@ -9,10 +9,10 @@ import java.util.HashMap;
import com.samskivert.util.HashIntMap;
import com.samskivert.util.StringUtil;
import com.threerings.cocktail.cher.Log;
import com.threerings.cocktail.cher.data.*;
import com.threerings.cocktail.cher.dobj.*;
import com.threerings.cocktail.cher.util.ClassUtil;
import com.threerings.presents.Log;
import com.threerings.presents.data.*;
import com.threerings.presents.dobj.*;
import com.threerings.presents.util.ClassUtil;
/**
* The invocation services provide client to server invocations (service
@@ -1,7 +1,7 @@
//
// $Id: InvocationReceiver.java,v 1.3 2001/10/02 02:05:50 mdb Exp $
// $Id: InvocationReceiver.java,v 1.4 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.client;
package com.threerings.presents.client;
/**
* Classes registered to process invocation notifications should implement
@@ -1,7 +1,7 @@
//
// $Id: LogonException.java,v 1.2 2001/05/30 23:58:31 mdb Exp $
// $Id: LogonException.java,v 1.3 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.client;
package com.threerings.presents.client;
/**
* A logon exception is used to indicate a failure to log on to the
@@ -1,9 +1,9 @@
//
// $Id: ClientObject.java,v 1.1 2001/07/19 05:56:20 mdb Exp $
// $Id: ClientObject.java,v 1.2 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.data;
package com.threerings.presents.data;
import com.threerings.cocktail.cher.dobj.DObject;
import com.threerings.presents.dobj.DObject;
/**
* Every client in the system has an associated client object to which
@@ -1,9 +1,9 @@
//
// $Id: InvocationObject.java,v 1.2 2001/07/19 19:18:06 mdb Exp $
// $Id: InvocationObject.java,v 1.3 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.data;
package com.threerings.presents.data;
import com.threerings.cocktail.cher.dobj.DObject;
import com.threerings.presents.dobj.DObject;
/**
* A single invocation object is created by the server invocation manager
@@ -1,14 +1,14 @@
//
// $Id: AttributeChangedEvent.java,v 1.8 2001/08/04 00:32:11 mdb Exp $
// $Id: AttributeChangedEvent.java,v 1.9 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.dobj;
package com.threerings.presents.dobj;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.lang.reflect.Method;
import com.threerings.cocktail.cher.dobj.io.ValueMarshaller;
import com.threerings.presents.dobj.io.ValueMarshaller;
/**
* An attribute changed event is dispatched when a single attribute of a
@@ -1,14 +1,14 @@
//
// $Id: AttributesChangedEvent.java,v 1.7 2001/08/04 00:32:11 mdb Exp $
// $Id: AttributesChangedEvent.java,v 1.8 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.dobj;
package com.threerings.presents.dobj;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import com.samskivert.util.StringUtil;
import com.threerings.cocktail.cher.dobj.io.ValueMarshaller;
import com.threerings.presents.dobj.io.ValueMarshaller;
/**
* An attribute<em>s</em> changed event is dispatched when multiple
@@ -1,7 +1,7 @@
//
// $Id: DEvent.java,v 1.5 2001/08/04 00:32:11 mdb Exp $
// $Id: DEvent.java,v 1.6 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.dobj;
package com.threerings.presents.dobj;
/**
* A distributed object event is dispatched whenever any modification is
@@ -1,7 +1,7 @@
//
// $Id: DEventUtil.java,v 1.2 2001/06/01 20:35:39 mdb Exp $
// $Id: DEventUtil.java,v 1.3 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.dobj;
package com.threerings.presents.dobj;
import java.lang.reflect.Method;
import java.util.HashMap;
@@ -1,16 +1,16 @@
//
// $Id: DObject.java,v 1.26 2001/08/21 19:35:02 mdb Exp $
// $Id: DObject.java,v 1.27 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.dobj;
package com.threerings.presents.dobj;
import java.lang.reflect.Field;
import java.util.ArrayList;
import com.samskivert.util.ListUtil;
import com.threerings.cocktail.cher.Log;
import com.threerings.presents.Log;
/**
* The distributed object forms the foundation of the cocktail system. All
* The distributed object forms the foundation of the Presents system. All
* information shared among users of the system is done via distributed
* objects. A distributed object has a set of subscribers. These
* subscribers have access to the object or a proxy of the object and
@@ -1,7 +1,7 @@
//
// $Id: DObjectManager.java,v 1.8 2001/08/07 20:38:58 mdb Exp $
// $Id: DObjectManager.java,v 1.9 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.dobj;
package com.threerings.presents.dobj;
/**
* The distributed object manager is responsible for managing the creation
@@ -1,15 +1,15 @@
//
// $Id: DSet.java,v 1.7 2001/10/02 02:05:50 mdb Exp $
// $Id: DSet.java,v 1.8 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.dobj;
package com.threerings.presents.dobj;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.Iterator;
import com.threerings.cocktail.cher.Log;
import com.threerings.cocktail.cher.io.Streamable;
import com.threerings.presents.Log;
import com.threerings.presents.io.Streamable;
/**
* The distributed set class provides a means by which an unordered set of
@@ -27,7 +27,7 @@ import com.threerings.cocktail.cher.io.Streamable;
* sent over the wire.
*
* <p> Classes that wish to act as set elements must implement the {@link
* com.threerings.cocktail.cher.dobj.DSet.Element} interface which extends
* com.threerings.presents.dobj.DSet.Element} interface which extends
* {@link Streamable} and adds the requirement that the object provide a
* key which will be used to identify element equality. Thus an element is
* declared to be in a set of the object returned by that element's
@@ -1,14 +1,14 @@
//
// $Id: EntryAddedEvent.java,v 1.3 2001/08/16 03:45:43 mdb Exp $
// $Id: EntryAddedEvent.java,v 1.4 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.dobj;
package com.threerings.presents.dobj;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import com.threerings.cocktail.cher.Log;
import com.threerings.cocktail.cher.dobj.io.ElementUtil;
import com.threerings.presents.Log;
import com.threerings.presents.dobj.io.ElementUtil;
/**
* An element added event is dispatched when an element is added to a
@@ -1,13 +1,13 @@
//
// $Id: EntryRemovedEvent.java,v 1.4 2001/08/21 19:33:38 mdb Exp $
// $Id: EntryRemovedEvent.java,v 1.5 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.dobj;
package com.threerings.presents.dobj;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import com.threerings.cocktail.cher.dobj.io.ValueMarshaller;
import com.threerings.presents.dobj.io.ValueMarshaller;
/**
* An element removed event is dispatched when an element is removed from
@@ -1,14 +1,14 @@
//
// $Id: EntryUpdatedEvent.java,v 1.1 2001/08/16 03:45:43 mdb Exp $
// $Id: EntryUpdatedEvent.java,v 1.2 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.dobj;
package com.threerings.presents.dobj;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import com.threerings.cocktail.cher.Log;
import com.threerings.cocktail.cher.dobj.io.ElementUtil;
import com.threerings.presents.Log;
import com.threerings.presents.dobj.io.ElementUtil;
/**
* An element updated event is dispatched when an element of a
@@ -1,7 +1,7 @@
//
// $Id: MessageEvent.java,v 1.5 2001/08/11 00:05:58 mdb Exp $
// $Id: MessageEvent.java,v 1.6 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.dobj;
package com.threerings.presents.dobj;
import java.io.DataInputStream;
import java.io.DataOutputStream;
@@ -9,7 +9,7 @@ import java.io.IOException;
import java.lang.reflect.Method;
import com.samskivert.util.StringUtil;
import com.threerings.cocktail.cher.dobj.io.ValueMarshaller;
import com.threerings.presents.dobj.io.ValueMarshaller;
/**
* A message event is used to dispatch a message to all subscribers of a
@@ -1,7 +1,7 @@
//
// $Id: NoSuchObjectException.java,v 1.1 2001/06/01 05:01:52 mdb Exp $
// $Id: NoSuchObjectException.java,v 1.2 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.dobj;
package com.threerings.presents.dobj;
/**
* A no such object exception is delivered when a subscriber requests
@@ -1,7 +1,7 @@
//
// $Id: ObjectAccessException.java,v 1.1 2001/06/01 05:01:52 mdb Exp $
// $Id: ObjectAccessException.java,v 1.2 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.dobj;
package com.threerings.presents.dobj;
/**
* An object access exception is delivered when an object is not
@@ -1,7 +1,7 @@
//
// $Id: ObjectAddedEvent.java,v 1.4 2001/08/04 00:32:11 mdb Exp $
// $Id: ObjectAddedEvent.java,v 1.5 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.dobj;
package com.threerings.presents.dobj;
import java.io.DataInputStream;
import java.io.DataOutputStream;
@@ -1,7 +1,7 @@
//
// $Id: ObjectDestroyedEvent.java,v 1.1 2001/08/07 20:38:58 mdb Exp $
// $Id: ObjectDestroyedEvent.java,v 1.2 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.dobj;
package com.threerings.presents.dobj;
import java.io.DataInputStream;
import java.io.DataOutputStream;
@@ -1,7 +1,7 @@
//
// $Id: ObjectRemovedEvent.java,v 1.4 2001/08/04 00:32:11 mdb Exp $
// $Id: ObjectRemovedEvent.java,v 1.5 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.dobj;
package com.threerings.presents.dobj;
import java.io.DataInputStream;
import java.io.DataOutputStream;
@@ -1,7 +1,7 @@
//
// $Id: OidList.java,v 1.3 2001/08/04 01:04:49 mdb Exp $
// $Id: OidList.java,v 1.4 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.dobj;
package com.threerings.presents.dobj;
import java.io.DataInputStream;
import java.io.DataOutputStream;
@@ -1,14 +1,14 @@
//
// $Id: ReleaseLockEvent.java,v 1.3 2001/08/04 01:05:12 mdb Exp $
// $Id: ReleaseLockEvent.java,v 1.4 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.dobj;
package com.threerings.presents.dobj;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.lang.reflect.Method;
import com.threerings.cocktail.cher.dobj.io.ValueMarshaller;
import com.threerings.presents.dobj.io.ValueMarshaller;
/**
* A release lock event is dispatched at the end of a chain of events to
@@ -1,7 +1,7 @@
//
// $Id: Subscriber.java,v 1.5 2001/08/02 04:49:08 mdb Exp $
// $Id: Subscriber.java,v 1.6 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.dobj;
package com.threerings.presents.dobj;
/**
* A subscriber is an entity that has access to a distributed object. The
@@ -1,13 +1,13 @@
//
// $Id: TypedEvent.java,v 1.1 2001/06/11 17:44:04 mdb Exp $
// $Id: TypedEvent.java,v 1.2 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.dobj;
package com.threerings.presents.dobj;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import com.threerings.cocktail.cher.io.TypedObject;
import com.threerings.presents.io.TypedObject;
/**
* A typed event is one that can be transmitted over the network. All
@@ -1,16 +1,16 @@
//
// $Id: DObjectFactory.java,v 1.7 2001/08/07 20:38:58 mdb Exp $
// $Id: DObjectFactory.java,v 1.8 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.dobj.io;
package com.threerings.presents.dobj.io;
import java.io.IOException;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.util.HashMap;
import com.threerings.cocktail.cher.Log;
import com.threerings.cocktail.cher.dobj.DObject;
import com.threerings.cocktail.cher.io.ObjectStreamException;
import com.threerings.presents.Log;
import com.threerings.presents.dobj.DObject;
import com.threerings.presents.io.ObjectStreamException;
/**
* The distributed object factory is responsible for marshalling and
@@ -1,11 +1,11 @@
//
// $Id: EntryUtil.java,v 1.2 2001/08/21 21:16:53 mdb Exp $
// $Id: EntryUtil.java,v 1.3 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.dobj.io;
package com.threerings.presents.dobj.io;
import java.io.*;
import com.threerings.cocktail.cher.dobj.DSet;
import com.threerings.presents.dobj.DSet;
/**
* Routines to simplify the process of moving set elements over the wire.
@@ -1,14 +1,14 @@
//
// $Id: BooleanFieldMarshaller.java,v 1.3 2001/06/11 17:42:20 mdb Exp $
// $Id: BooleanFieldMarshaller.java,v 1.4 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.dobj.io;
package com.threerings.presents.dobj.io;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.lang.reflect.Field;
import com.threerings.cocktail.cher.dobj.DObject;
import com.threerings.presents.dobj.DObject;
public class BooleanFieldMarshaller implements FieldMarshaller
{
@@ -1,15 +1,15 @@
//
// $Id: DSetFieldMarshaller.java,v 1.1 2001/08/20 21:44:10 mdb Exp $
// $Id: DSetFieldMarshaller.java,v 1.2 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.dobj.io;
package com.threerings.presents.dobj.io;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.lang.reflect.Field;
import com.threerings.cocktail.cher.dobj.DObject;
import com.threerings.cocktail.cher.dobj.DSet;
import com.threerings.presents.dobj.DObject;
import com.threerings.presents.dobj.DSet;
public class DSetFieldMarshaller implements FieldMarshaller
{
@@ -1,14 +1,14 @@
//
// $Id: DoubleFieldMarshaller.java,v 1.3 2001/06/11 17:42:20 mdb Exp $
// $Id: DoubleFieldMarshaller.java,v 1.4 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.dobj.io;
package com.threerings.presents.dobj.io;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.lang.reflect.Field;
import com.threerings.cocktail.cher.dobj.DObject;
import com.threerings.presents.dobj.DObject;
public class DoubleFieldMarshaller implements FieldMarshaller
{
@@ -1,14 +1,14 @@
//
// $Id: FieldMarshaller.java,v 1.3 2001/06/11 17:42:20 mdb Exp $
// $Id: FieldMarshaller.java,v 1.4 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.dobj.io;
package com.threerings.presents.dobj.io;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.lang.reflect.Field;
import com.threerings.cocktail.cher.dobj.DObject;
import com.threerings.presents.dobj.DObject;
/**
* A field marshaller knows how to marshall and unmarshall a particular
@@ -1,11 +1,11 @@
//
// $Id: FieldMarshallerRegistry.java,v 1.5 2001/08/20 21:44:10 mdb Exp $
// $Id: FieldMarshallerRegistry.java,v 1.6 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.dobj.io;
package com.threerings.presents.dobj.io;
import java.lang.reflect.Field;
import java.util.Hashtable;
import com.threerings.cocktail.cher.Log;
import com.threerings.presents.Log;
/**
* Field marshaller instances are registered for each type of field that
@@ -1,14 +1,14 @@
//
// $Id: FloatFieldMarshaller.java,v 1.3 2001/06/11 17:42:20 mdb Exp $
// $Id: FloatFieldMarshaller.java,v 1.4 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.dobj.io;
package com.threerings.presents.dobj.io;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.lang.reflect.Field;
import com.threerings.cocktail.cher.dobj.DObject;
import com.threerings.presents.dobj.DObject;
public class FloatFieldMarshaller implements FieldMarshaller
{
@@ -1,7 +1,7 @@
//
// $Id: FramedInputStream.java,v 1.6 2001/08/21 23:26:21 mdb Exp $
// $Id: FramedInputStream.java,v 1.7 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.io;
package com.threerings.presents.io;
import java.io.EOFException;
import java.io.IOException;
@@ -9,7 +9,7 @@ import java.io.InputStream;
import com.samskivert.util.StringUtil;
import com.threerings.cocktail.cher.Log;
import com.threerings.presents.Log;
/**
* The framed input stream reads input that was framed by a framing output
@@ -1,7 +1,7 @@
//
// $Id: FramingOutputStream.java,v 1.3 2001/05/30 23:58:31 mdb Exp $
// $Id: FramingOutputStream.java,v 1.4 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.io;
package com.threerings.presents.io;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
@@ -1,14 +1,14 @@
//
// $Id: IntFieldMarshaller.java,v 1.3 2001/06/11 17:42:20 mdb Exp $
// $Id: IntFieldMarshaller.java,v 1.4 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.dobj.io;
package com.threerings.presents.dobj.io;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.lang.reflect.Field;
import com.threerings.cocktail.cher.dobj.DObject;
import com.threerings.presents.dobj.DObject;
public class IntFieldMarshaller implements FieldMarshaller
{
@@ -1,14 +1,14 @@
//
// $Id: LongFieldMarshaller.java,v 1.3 2001/06/11 17:42:20 mdb Exp $
// $Id: LongFieldMarshaller.java,v 1.4 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.dobj.io;
package com.threerings.presents.dobj.io;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.lang.reflect.Field;
import com.threerings.cocktail.cher.dobj.DObject;
import com.threerings.presents.dobj.DObject;
public class LongFieldMarshaller implements FieldMarshaller
{
@@ -1,7 +1,7 @@
//
// $Id: Marshaller.java,v 1.4 2001/06/11 17:42:20 mdb Exp $
// $Id: Marshaller.java,v 1.5 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.dobj.io;
package com.threerings.presents.dobj.io;
import java.io.DataInputStream;
import java.io.DataOutputStream;
@@ -13,9 +13,9 @@ import java.util.Arrays;
import java.util.ArrayList;
import java.util.Comparator;
import com.threerings.cocktail.cher.Log;
import com.threerings.cocktail.cher.dobj.DObject;
import com.threerings.cocktail.cher.io.ObjectStreamException;
import com.threerings.presents.Log;
import com.threerings.presents.dobj.DObject;
import com.threerings.presents.io.ObjectStreamException;
/**
* The marshaller inspects the class with which it is constructed and
@@ -1,7 +1,7 @@
//
// $Id: ObjectStreamException.java,v 1.3 2001/05/30 23:58:31 mdb Exp $
// $Id: ObjectStreamException.java,v 1.4 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.io;
package com.threerings.presents.io;
import java.io.IOException;
@@ -1,15 +1,15 @@
//
// $Id: OidListFieldMarshaller.java,v 1.1 2001/08/02 05:09:21 mdb Exp $
// $Id: OidListFieldMarshaller.java,v 1.2 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.dobj.io;
package com.threerings.presents.dobj.io;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.lang.reflect.Field;
import com.threerings.cocktail.cher.dobj.DObject;
import com.threerings.cocktail.cher.dobj.OidList;
import com.threerings.presents.dobj.DObject;
import com.threerings.presents.dobj.OidList;
public class OidListFieldMarshaller implements FieldMarshaller
{
@@ -1,14 +1,14 @@
//
// $Id: ShortFieldMarshaller.java,v 1.3 2001/06/11 17:42:20 mdb Exp $
// $Id: ShortFieldMarshaller.java,v 1.4 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.dobj.io;
package com.threerings.presents.dobj.io;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.lang.reflect.Field;
import com.threerings.cocktail.cher.dobj.DObject;
import com.threerings.presents.dobj.DObject;
public class ShortFieldMarshaller implements FieldMarshaller
{
@@ -1,7 +1,7 @@
//
// $Id: Streamable.java,v 1.1 2001/08/16 03:25:14 mdb Exp $
// $Id: Streamable.java,v 1.2 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.io;
package com.threerings.presents.io;
import java.io.IOException;
import java.io.DataInputStream;
@@ -1,14 +1,14 @@
//
// $Id: StringFieldMarshaller.java,v 1.4 2001/06/11 17:42:20 mdb Exp $
// $Id: StringFieldMarshaller.java,v 1.5 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.dobj.io;
package com.threerings.presents.dobj.io;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.lang.reflect.Field;
import com.threerings.cocktail.cher.dobj.DObject;
import com.threerings.presents.dobj.DObject;
public class StringFieldMarshaller implements FieldMarshaller
{
@@ -1,7 +1,7 @@
//
// $Id: TypedObject.java,v 1.4 2001/08/16 03:25:14 mdb Exp $
// $Id: TypedObject.java,v 1.5 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.io;
package com.threerings.presents.io;
/**
* A typed object is one that is associated with a particular type code.
@@ -1,14 +1,14 @@
//
// $Id: TypedObjectFactory.java,v 1.6 2001/06/13 05:16:25 mdb Exp $
// $Id: TypedObjectFactory.java,v 1.7 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.io;
package com.threerings.presents.io;
import java.io.IOException;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.util.HashMap;
import com.threerings.cocktail.cher.Log;
import com.threerings.presents.Log;
/**
* The encodable factory is used to unserialize encodable object instances
@@ -1,10 +1,10 @@
//
// $Id: TypedObjectRegistry.java,v 1.6 2001/08/16 03:31:09 mdb Exp $
// $Id: TypedObjectRegistry.java,v 1.7 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.io;
package com.threerings.presents.io;
import com.threerings.cocktail.cher.dobj.*;
import com.threerings.cocktail.cher.net.*;
import com.threerings.presents.dobj.*;
import com.threerings.presents.net.*;
/**
* The registry provides a single place where all typed objects that are
@@ -1,13 +1,13 @@
//
// $Id: ValueMarshaller.java,v 1.4 2001/10/03 03:38:55 mdb Exp $
// $Id: ValueMarshaller.java,v 1.5 2001/10/11 04:07:52 mdb Exp $
package com.threerings.cocktail.cher.dobj.io;
package com.threerings.presents.dobj.io;
import java.io.*;
import java.util.HashMap;
import com.samskivert.util.HashIntMap;
import com.threerings.cocktail.cher.io.Streamable;
import com.threerings.presents.io.Streamable;
/**
* The value marshaller provides a mechanism for marshalling and
@@ -37,7 +37,7 @@ public class ValueMarshaller
* The value must be one of the valid distributed object attribute
* types.
*
* @see com.threerings.cocktail.cher.dobj.DObject
* @see com.threerings.presents.dobj.DObject
* @see #readFrom
*/
public static void writeTo (DataOutputStream out, Object value)
@@ -1,13 +1,13 @@
//
// $Id: AuthRequest.java,v 1.6 2001/07/19 19:30:14 mdb Exp $
// $Id: AuthRequest.java,v 1.7 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.net;
package com.threerings.presents.net;
import java.io.IOException;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import com.threerings.cocktail.cher.io.TypedObjectFactory;
import com.threerings.presents.io.TypedObjectFactory;
public class AuthRequest extends UpstreamMessage
{
@@ -1,13 +1,13 @@
//
// $Id: AuthResponse.java,v 1.8 2001/07/19 19:30:14 mdb Exp $
// $Id: AuthResponse.java,v 1.9 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.net;
package com.threerings.presents.net;
import java.io.IOException;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import com.threerings.cocktail.cher.dobj.io.DObjectFactory;
import com.threerings.presents.dobj.io.DObjectFactory;
/**
* The auth response communicates authentication success or failure as
@@ -1,9 +1,9 @@
//
// $Id: AuthResponseData.java,v 1.8 2001/10/03 03:41:04 mdb Exp $
// $Id: AuthResponseData.java,v 1.9 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.net;
package com.threerings.presents.net;
import com.threerings.cocktail.cher.dobj.DObject;
import com.threerings.presents.dobj.DObject;
/**
* An <code>AuthResponseData</code> object is communicated back to the
@@ -1,9 +1,9 @@
//
// $Id: BootstrapData.java,v 1.2 2001/10/09 18:17:52 mdb Exp $
// $Id: BootstrapData.java,v 1.3 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.net;
package com.threerings.presents.net;
import com.threerings.cocktail.cher.dobj.DObject;
import com.threerings.presents.dobj.DObject;
/**
* A <code>BootstrapData</code> object is communicated back to the client
@@ -1,13 +1,13 @@
//
// $Id: BootstrapNotification.java,v 1.2 2001/07/19 19:30:14 mdb Exp $
// $Id: BootstrapNotification.java,v 1.3 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.net;
package com.threerings.presents.net;
import java.io.IOException;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import com.threerings.cocktail.cher.dobj.io.DObjectFactory;
import com.threerings.presents.dobj.io.DObjectFactory;
/**
* A bootstrap notification is delivered to the client once the server has
@@ -1,14 +1,14 @@
//
// $Id: Credentials.java,v 1.6 2001/07/19 19:30:14 mdb Exp $
// $Id: Credentials.java,v 1.7 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.net;
package com.threerings.presents.net;
import java.io.IOException;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import com.threerings.cocktail.cher.io.TypedObject;
import com.threerings.cocktail.cher.io.TypedObjectFactory;
import com.threerings.presents.io.TypedObject;
import com.threerings.presents.io.TypedObjectFactory;
/**
* Credentials are supplied by the client implementation and sent along to
@@ -1,13 +1,13 @@
//
// $Id: DownstreamMessage.java,v 1.7 2001/07/19 19:30:14 mdb Exp $
// $Id: DownstreamMessage.java,v 1.8 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.net;
package com.threerings.presents.net;
import java.io.IOException;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import com.threerings.cocktail.cher.io.TypedObject;
import com.threerings.presents.io.TypedObject;
/**
* The <code>DownstreamMessage</code> class encapsulates a message in the
@@ -1,14 +1,14 @@
//
// $Id: EventNotification.java,v 1.9 2001/07/19 19:30:14 mdb Exp $
// $Id: EventNotification.java,v 1.10 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.net;
package com.threerings.presents.net;
import java.io.IOException;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import com.threerings.cocktail.cher.dobj.TypedEvent;
import com.threerings.cocktail.cher.io.TypedObjectFactory;
import com.threerings.presents.dobj.TypedEvent;
import com.threerings.presents.io.TypedObjectFactory;
public class EventNotification extends DownstreamMessage
{
@@ -1,7 +1,7 @@
//
// $Id: FailureResponse.java,v 1.6 2001/07/19 19:30:14 mdb Exp $
// $Id: FailureResponse.java,v 1.7 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.net;
package com.threerings.presents.net;
import java.io.IOException;
import java.io.DataInputStream;
@@ -1,14 +1,14 @@
//
// $Id: ForwardEventRequest.java,v 1.8 2001/07/19 19:30:14 mdb Exp $
// $Id: ForwardEventRequest.java,v 1.9 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.net;
package com.threerings.presents.net;
import java.io.IOException;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import com.threerings.cocktail.cher.dobj.TypedEvent;
import com.threerings.cocktail.cher.io.TypedObjectFactory;
import com.threerings.presents.dobj.TypedEvent;
import com.threerings.presents.io.TypedObjectFactory;
public class ForwardEventRequest extends UpstreamMessage
{
@@ -1,7 +1,7 @@
//
// $Id: LogoffRequest.java,v 1.4 2001/07/19 19:30:14 mdb Exp $
// $Id: LogoffRequest.java,v 1.5 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.net;
package com.threerings.presents.net;
public class LogoffRequest extends UpstreamMessage
{
@@ -1,14 +1,14 @@
//
// $Id: ObjectResponse.java,v 1.10 2001/07/19 19:30:14 mdb Exp $
// $Id: ObjectResponse.java,v 1.11 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.net;
package com.threerings.presents.net;
import java.io.IOException;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import com.threerings.cocktail.cher.dobj.DObject;
import com.threerings.cocktail.cher.dobj.io.DObjectFactory;
import com.threerings.presents.dobj.DObject;
import com.threerings.presents.dobj.io.DObjectFactory;
public class ObjectResponse extends DownstreamMessage
{
@@ -1,7 +1,7 @@
//
// $Id: PingRequest.java,v 1.4 2001/07/19 19:30:14 mdb Exp $
// $Id: PingRequest.java,v 1.5 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.net;
package com.threerings.presents.net;
public class PingRequest extends UpstreamMessage
{
@@ -1,7 +1,7 @@
//
// $Id: PongResponse.java,v 1.5 2001/07/19 19:30:14 mdb Exp $
// $Id: PongResponse.java,v 1.6 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.net;
package com.threerings.presents.net;
public class PongResponse extends DownstreamMessage
{
@@ -1,7 +1,7 @@
//
// $Id: SubscribeRequest.java,v 1.4 2001/07/19 19:30:14 mdb Exp $
// $Id: SubscribeRequest.java,v 1.5 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.net;
package com.threerings.presents.net;
import java.io.IOException;
import java.io.DataInputStream;
@@ -1,7 +1,7 @@
//
// $Id: UnsubscribeRequest.java,v 1.5 2001/07/19 19:30:14 mdb Exp $
// $Id: UnsubscribeRequest.java,v 1.6 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.net;
package com.threerings.presents.net;
import java.io.IOException;
import java.io.DataInputStream;
@@ -1,13 +1,13 @@
//
// $Id: UpstreamMessage.java,v 1.7 2001/07/19 19:30:14 mdb Exp $
// $Id: UpstreamMessage.java,v 1.8 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.net;
package com.threerings.presents.net;
import java.io.IOException;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import com.threerings.cocktail.cher.io.TypedObject;
import com.threerings.presents.io.TypedObject;
/**
* The <code>UpstreamMessage</code> class encapsulates a message in the
@@ -1,7 +1,7 @@
//
// $Id: UsernamePasswordCreds.java,v 1.5 2001/06/02 01:30:37 mdb Exp $
// $Id: UsernamePasswordCreds.java,v 1.6 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.net;
package com.threerings.presents.net;
import java.io.DataInputStream;
import java.io.DataOutputStream;
@@ -1,10 +1,10 @@
//
// $Id: Authenticator.java,v 1.2 2001/05/30 23:58:31 mdb Exp $
// $Id: Authenticator.java,v 1.3 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.server.net;
package com.threerings.presents.server.net;
import com.threerings.cocktail.cher.net.AuthRequest;
import com.threerings.cocktail.cher.net.AuthResponse;
import com.threerings.presents.net.AuthRequest;
import com.threerings.presents.net.AuthResponse;
/**
* The authenticator is a pluggable component of the authentication
@@ -1,15 +1,15 @@
//
// $Id: ClientManager.java,v 1.10 2001/08/07 21:20:48 mdb Exp $
// $Id: ClientManager.java,v 1.11 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.server;
package com.threerings.presents.server;
import java.io.IOException;
import java.util.HashMap;
import com.threerings.cocktail.cher.Log;
import com.threerings.cocktail.cher.data.ClientObject;
import com.threerings.cocktail.cher.net.Credentials;
import com.threerings.cocktail.cher.server.net.*;
import com.threerings.presents.Log;
import com.threerings.presents.data.ClientObject;
import com.threerings.presents.net.Credentials;
import com.threerings.presents.server.net.*;
/**
* The client manager is responsible for managing the clients (surprise,
@@ -32,17 +32,17 @@ public class ClientManager implements ConnectionObserver
/**
* Instructs the client manager to construct instances of this derived
* class of <code>CherClient</code> to managed newly accepted client
* class of <code>PresentsClient</code> to managed newly accepted client
* connections.
*
* @see CherClient
* @see PresentsClient
*/
public void setClientClass (Class clientClass)
{
// sanity check
if (!CherClient.class.isAssignableFrom(clientClass)) {
if (!PresentsClient.class.isAssignableFrom(clientClass)) {
Log.warning("Requested to use client class that does not " +
"derive from CherClient " +
"derive from PresentsClient " +
"[class=" + clientClass.getName() + "].");
return;
}
@@ -56,7 +56,7 @@ public class ClientManager implements ConnectionObserver
* <code>ClientObject</code> derived class when creating the
* distributed object that corresponds to a particular client session.
*
* @see com.threerings.cocktail.cher.data.ClientObject
* @see com.threerings.presents.data.ClientObject
*/
public void setClientObjectClass (Class clobjClass)
{
@@ -75,7 +75,7 @@ public class ClientManager implements ConnectionObserver
/**
* Returns the class that should be used when creating a distributed
* object to accompany a particular client session. In general, this
* is only used by the <code>CherClient</code> object when it is
* is only used by the <code>PresentsClient</code> object when it is
* setting up a client's session for the first time.
*/
public Class getClientObjectClass ()
@@ -96,7 +96,7 @@ public class ClientManager implements ConnectionObserver
String username = creds.getUsername();
// see if there's a client already registered with this username
CherClient client = (CherClient)_usermap.get(username);
PresentsClient client = (PresentsClient)_usermap.get(username);
if (client != null) {
Log.info("Session resumed [username=" + username +
@@ -108,7 +108,7 @@ public class ClientManager implements ConnectionObserver
", conn=" + conn + "].");
// create a new client and stick'em in the table
try {
client = (CherClient)_clientClass.newInstance();
client = (PresentsClient)_clientClass.newInstance();
client.startSession(this, username, conn);
_usermap.put(username, client);
} catch (Exception e) {
@@ -136,7 +136,7 @@ public class ClientManager implements ConnectionObserver
void connectionFailed (Connection conn, IOException fault)
{
// remove the client from the connection map
CherClient client = (CherClient)_conmap.remove(conn);
PresentsClient client = (PresentsClient)_conmap.remove(conn);
if (client != null) {
Log.info("Unmapped failed client [client=" + client +
", conn=" + conn + ", fault=" + fault + "].");
@@ -159,7 +159,7 @@ public class ClientManager implements ConnectionObserver
public synchronized void connectionClosed (Connection conn)
{
// remove the client from the connection map
CherClient client = (CherClient)_conmap.remove(conn);
PresentsClient client = (PresentsClient)_conmap.remove(conn);
if (client != null) {
Log.info("Unmapped client [client=" + client +
", conn=" + conn + "].");
@@ -175,10 +175,10 @@ public class ClientManager implements ConnectionObserver
* Called by the client instance when the client requests a logoff.
* This is called from the conmgr thread.
*/
synchronized void clientDidEndSession (CherClient client)
synchronized void clientDidEndSession (PresentsClient client)
{
// remove the client from the username map
CherClient rc = (CherClient)_usermap.remove(client.getUsername());
PresentsClient rc = (PresentsClient)_usermap.remove(client.getUsername());
// sanity check because we can
if (rc == null) {
@@ -197,6 +197,6 @@ public class ClientManager implements ConnectionObserver
protected HashMap _usermap = new HashMap();
protected HashMap _conmap = new HashMap();
protected Class _clientClass = CherClient.class;
protected Class _clientClass = PresentsClient.class;
protected Class _clobjClass = ClientObject.class;
}
@@ -1,11 +1,11 @@
//
// $Id: DummyAuthenticator.java,v 1.3 2001/10/01 22:14:55 mdb Exp $
// $Id: DummyAuthenticator.java,v 1.4 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.server;
package com.threerings.presents.server;
import com.threerings.cocktail.cher.Log;
import com.threerings.cocktail.cher.net.*;
import com.threerings.cocktail.cher.server.net.Authenticator;
import com.threerings.presents.Log;
import com.threerings.presents.net.*;
import com.threerings.presents.server.net.Authenticator;
public class DummyAuthenticator implements Authenticator
{
@@ -1,15 +1,15 @@
//
// $Id: InvocationManager.java,v 1.7 2001/08/14 06:47:38 mdb Exp $
// $Id: InvocationManager.java,v 1.8 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.server;
package com.threerings.presents.server;
import java.lang.reflect.Method;
import java.util.HashMap;
import com.threerings.cocktail.cher.Log;
import com.threerings.cocktail.cher.dobj.*;
import com.threerings.cocktail.cher.data.*;
import com.threerings.cocktail.cher.util.ClassUtil;
import com.threerings.presents.Log;
import com.threerings.presents.dobj.*;
import com.threerings.presents.data.*;
import com.threerings.presents.util.ClassUtil;
/**
* The invocation services provide client to server invocations (service
@@ -86,7 +86,7 @@ public class InvocationManager
// construct a message event and deliver it
MessageEvent nevt = new MessageEvent(
cloid, InvocationObject.NOTIFICATION_NAME, nargs);
CherServer.omgr.postEvent(nevt);
PresentsServer.omgr.postEvent(nevt);
}
public void objectAvailable (DObject object)
@@ -137,7 +137,7 @@ public class InvocationManager
// prune the method arguments from the full message arguments
Object[] margs = new Object[args.length-1];
int cloid = mevt.getSourceOid();
margs[0] = CherServer.omgr.getObject(cloid);
margs[0] = PresentsServer.omgr.getObject(cloid);
// make sure the client is still around
if (margs[0] == null) {
Log.warning("Client no longer around for invocation provider " +
@@ -1,14 +1,14 @@
//
// $Id: InvocationProvider.java,v 1.5 2001/08/11 02:02:24 mdb Exp $
// $Id: InvocationProvider.java,v 1.6 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.server;
package com.threerings.presents.server;
import com.samskivert.util.StringUtil;
import com.threerings.cocktail.cher.Log;
import com.threerings.cocktail.cher.data.ClientObject;
import com.threerings.cocktail.cher.data.InvocationObject;
import com.threerings.cocktail.cher.dobj.MessageEvent;
import com.threerings.presents.Log;
import com.threerings.presents.data.ClientObject;
import com.threerings.presents.data.InvocationObject;
import com.threerings.presents.dobj.MessageEvent;
/**
* Invocation providers should extend this class when implementing
@@ -123,7 +123,7 @@ public class InvocationProvider
MessageEvent mevt = new MessageEvent(
source.getOid(), InvocationObject.RESPONSE_NAME, args);
// and ship it off
CherServer.omgr.postEvent(mevt);
PresentsServer.omgr.postEvent(mevt);
} else {
Log.warning("Dropping invrsp due to disappearing client " +
@@ -1,7 +1,7 @@
//
// $Id: PresentsClient.java,v 1.19 2001/10/02 02:05:50 mdb Exp $
// $Id: PresentsClient.java,v 1.20 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.server;
package com.threerings.presents.server;
import java.io.IOException;
import java.util.HashMap;
@@ -9,11 +9,11 @@ import java.util.Iterator;
import com.samskivert.util.HashIntMap;
import com.threerings.cocktail.cher.Log;
import com.threerings.cocktail.cher.data.ClientObject;
import com.threerings.cocktail.cher.dobj.*;
import com.threerings.cocktail.cher.net.*;
import com.threerings.cocktail.cher.server.net.*;
import com.threerings.presents.Log;
import com.threerings.presents.data.ClientObject;
import com.threerings.presents.dobj.*;
import com.threerings.presents.net.*;
import com.threerings.presents.server.net.*;
/**
* A client object represents a client session in the server. It is
@@ -29,7 +29,7 @@ import com.threerings.cocktail.cher.server.net.*;
* not overlap with its other client duties which are called from the
* conmgr thread and therefore also need not be synchronized.
*/
public class CherClient implements Subscriber, MessageHandler
public class PresentsClient implements Subscriber, MessageHandler
{
/**
* Returns the username with which this client instance is associated.
@@ -72,7 +72,7 @@ public class CherClient implements Subscriber, MessageHandler
public void requestFailed (int oid, ObjectAccessException cause)
{
Log.warning("Unable to create client object " +
"[client=" + CherClient.this +
"[client=" + PresentsClient.this +
", error=" + cause + "].");
}
@@ -82,7 +82,7 @@ public class CherClient implements Subscriber, MessageHandler
}
};
Class clobjClass = _cmgr.getClientObjectClass();
CherServer.omgr.createObject(clobjClass, sub, false);
PresentsServer.omgr.createObject(clobjClass, sub, false);
}
/**
@@ -130,7 +130,7 @@ public class CherClient implements Subscriber, MessageHandler
return false;
}
};
CherServer.omgr.postEvent(event);
PresentsServer.omgr.postEvent(event);
}
/**
@@ -182,7 +182,7 @@ public class CherClient implements Subscriber, MessageHandler
return false;
}
};
CherServer.omgr.postEvent(event);
PresentsServer.omgr.postEvent(event);
}
/**
@@ -266,7 +266,7 @@ public class CherClient implements Subscriber, MessageHandler
protected void sessionDidTerminate ()
{
// destroy the client object
CherServer.omgr.destroyObject(_clobj.getOid());
PresentsServer.omgr.destroyObject(_clobj.getOid());
}
/**
@@ -312,7 +312,7 @@ public class CherClient implements Subscriber, MessageHandler
data.clientOid = _clobj.getOid();
// give them the invocation oid
data.invOid = CherServer.invmgr.getOid();
data.invOid = PresentsServer.invmgr.getOid();
}
/**
@@ -343,7 +343,7 @@ public class CherClient implements Subscriber, MessageHandler
return false;
}
};
CherServer.omgr.postEvent(event);
PresentsServer.omgr.postEvent(event);
}
/**
@@ -468,7 +468,7 @@ public class CherClient implements Subscriber, MessageHandler
/**
* Dispatch the supplied message for the specified client.
*/
public void dispatch (CherClient client, UpstreamMessage mge);
public void dispatch (PresentsClient client, UpstreamMessage mge);
}
/**
@@ -476,14 +476,14 @@ public class CherClient implements Subscriber, MessageHandler
*/
protected static class SubscribeDispatcher implements MessageDispatcher
{
public void dispatch (CherClient client, UpstreamMessage msg)
public void dispatch (PresentsClient client, UpstreamMessage msg)
{
SubscribeRequest req = (SubscribeRequest)msg;
// Log.info("Subscribing [client=" + client +
// ", oid=" + req.getOid() + "].");
// forward the subscribe request to the omgr for processing
CherServer.omgr.subscribeToObject(req.getOid(), client);
PresentsServer.omgr.subscribeToObject(req.getOid(), client);
}
}
@@ -492,14 +492,14 @@ public class CherClient implements Subscriber, MessageHandler
*/
protected static class UnsubscribeDispatcher implements MessageDispatcher
{
public void dispatch (CherClient client, UpstreamMessage msg)
public void dispatch (PresentsClient client, UpstreamMessage msg)
{
UnsubscribeRequest req = (UnsubscribeRequest)msg;
// Log.info("Unsubscribing [client=" + client +
// ", oid=" + req.getOid() + "].");
// forward the unsubscribe request to the omgr for processing
CherServer.omgr.unsubscribeFromObject(req.getOid(), client);
PresentsServer.omgr.unsubscribeFromObject(req.getOid(), client);
// update our subscription tracking table
client.unmapSubscrip(req.getOid());
}
@@ -510,7 +510,7 @@ public class CherClient implements Subscriber, MessageHandler
*/
protected static class ForwardEventDispatcher implements MessageDispatcher
{
public void dispatch (CherClient client, UpstreamMessage msg)
public void dispatch (PresentsClient client, UpstreamMessage msg)
{
ForwardEventRequest req = (ForwardEventRequest)msg;
DEvent fevt = req.getEvent();
@@ -522,7 +522,7 @@ public class CherClient implements Subscriber, MessageHandler
// ", event=" + fevt + "].");
// forward the event to the omgr for processing
CherServer.omgr.postEvent(fevt);
PresentsServer.omgr.postEvent(fevt);
}
}
@@ -531,7 +531,7 @@ public class CherClient implements Subscriber, MessageHandler
*/
protected static class PingDispatcher implements MessageDispatcher
{
public void dispatch (CherClient client, UpstreamMessage msg)
public void dispatch (PresentsClient client, UpstreamMessage msg)
{
Log.info("Received client ping [client=" + client + "].");
// send a pong response
@@ -549,7 +549,7 @@ public class CherClient implements Subscriber, MessageHandler
*/
protected static class LogoffDispatcher implements MessageDispatcher
{
public void dispatch (CherClient client, UpstreamMessage msg)
public void dispatch (PresentsClient client, UpstreamMessage msg)
{
Log.info("Client requested logoff " +
"[client=" + client + "].");
@@ -1,7 +1,7 @@
//
// $Id: PresentsDObjectMgr.java,v 1.16 2001/10/03 03:40:44 mdb Exp $
// $Id: PresentsDObjectMgr.java,v 1.17 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.server;
package com.threerings.presents.server;
import java.lang.reflect.*;
import java.util.HashMap;
@@ -9,28 +9,28 @@ import java.util.HashMap;
import com.samskivert.util.HashIntMap;
import com.samskivert.util.Queue;
import com.threerings.cocktail.cher.Log;
import com.threerings.cocktail.cher.dobj.*;
import com.threerings.presents.Log;
import com.threerings.presents.dobj.*;
/**
* The cher distributed object manager implements the
* <code>DObjectManager</code> interface, providing an object manager that
* runs on the server. By virtue of running on the server, it manages its
* objects directly rather than managing proxies of objects which is what
* is done on the client. Thus it simply queues up events and dispatches
* them to subscribers.
* The presents distributed object manager implements the {@link
* DObjectManager} interface, providing an object manager that runs on the
* server. By virtue of running on the server, it manages its objects
* directly rather than managing proxies of objects which is what is done
* on the client. Thus it simply queues up events and dispatches them to
* subscribers.
*
* <p> The server object manager is meant to run on the main thread of the
* server application and thus provides a method to be invoked by the
* application main thread which won't return until the manager has been
* requested to shut down.
*/
public class CherDObjectMgr implements DObjectManager
public class PresentsDObjectMgr implements DObjectManager
{
/**
* Creates the dobjmgr and prepares it for operation.
*/
public CherDObjectMgr ()
public PresentsDObjectMgr ()
{
// we create a dummy object to live as oid zero and we'll use that
// for some internal event trickery
@@ -474,7 +474,7 @@ public class CherDObjectMgr implements DObjectManager
// initialize this object
obj.setOid(oid);
obj.setManager(CherDObjectMgr.this);
obj.setManager(PresentsDObjectMgr.this);
// insert it into the table
_objects.put(oid, obj);
@@ -598,7 +598,7 @@ public class CherDObjectMgr implements DObjectManager
protected static void registerEventHelpers ()
{
Class[] ptypes = new Class[] { DEvent.class, DObject.class };
Class omgrcl = CherDObjectMgr.class;
Class omgrcl = PresentsDObjectMgr.class;
Method method;
try {
@@ -1,32 +1,33 @@
//
// $Id: PresentsServer.java,v 1.13 2001/09/28 22:32:28 mdb Exp $
// $Id: PresentsServer.java,v 1.14 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.server;
package com.threerings.presents.server;
import com.samskivert.util.Config;
import com.threerings.cocktail.cher.Log;
import com.threerings.cocktail.cher.dobj.DObjectManager;
import com.threerings.cocktail.cher.server.net.AuthManager;
import com.threerings.cocktail.cher.server.net.ConnectionManager;
import com.threerings.presents.Log;
import com.threerings.presents.dobj.DObjectManager;
import com.threerings.presents.server.net.AuthManager;
import com.threerings.presents.server.net.ConnectionManager;
import com.threerings.cocktail.cher.server.test.TestObject;
import com.threerings.cocktail.cher.server.test.TestProvider;
import com.threerings.cocktail.cher.client.test.TestService;
import com.threerings.presents.server.test.TestObject;
import com.threerings.presents.server.test.TestProvider;
import com.threerings.presents.client.test.TestService;
/**
* The cher server provides a central point of access to the various
* facilities that make up the cher framework. To facilitate extension and
* customization, a single instance of the cher server should be created
* and initialized in a process. To facilitate easy access to the services
* provided by the cher server, static references to the various managers
* are made available in the <code>CherServer</code> class. These will be
* configured when the singleton instance is initialized.
* The presents server provides a central point of access to the various
* facilities that make up the presents framework. To facilitate extension
* and customization, a single instance of the presents server should be
* created and initialized in a process. To facilitate easy access to the
* services provided by the presents server, static references to the
* various managers are made available in the <code>PresentsServer</code>
* class. These will be configured when the singleton instance is
* initialized.
*/
public class CherServer
public class PresentsServer
{
/** The namespace used for server config properties. */
public static final String CONFIG_KEY = "cher";
public static final String CONFIG_KEY = "presents";
/** The server configuration. */
public static Config config;
@@ -41,7 +42,7 @@ public class CherServer
public static ClientManager clmgr;
/** The distributed object manager. */
public static CherDObjectMgr omgr;
public static PresentsDObjectMgr omgr;
/** The invocation manager. */
public static InvocationManager invmgr;
@@ -54,7 +55,7 @@ public class CherServer
{
// create our configuration object
config = new Config();
// bind the cher server config into the namespace
// bind the presents server config into the namespace
config.bindProperties(CONFIG_KEY, CONFIG_PATH, true);
// create our authentication manager
@@ -64,7 +65,7 @@ public class CherServer
// create our client manager
clmgr = new ClientManager(conmgr);
// create our distributed object manager
omgr = new CherDObjectMgr();
omgr = new PresentsDObjectMgr();
// create our invocation manager
invmgr = new InvocationManager(omgr);
@@ -147,9 +148,9 @@ public class CherServer
public static void main (String[] args)
{
Log.info("Cher server starting...");
Log.info("Presents server starting...");
CherServer server = new CherServer();
PresentsServer server = new PresentsServer();
try {
// initialize the server
server.init();
@@ -182,7 +183,7 @@ public class CherServer
// the path to the config file
protected final static String CONFIG_PATH =
"rsrc/config/cocktail/cher/server";
"rsrc/config/presents/server";
// the config key for our list of invocation provider mappings
protected final static String PROVIDERS_KEY = CONFIG_KEY + ".providers";
@@ -1,7 +1,7 @@
//
// $Id: ServiceFailedException.java,v 1.1 2001/10/01 23:06:23 mdb Exp $
// $Id: ServiceFailedException.java,v 1.2 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.server;
package com.threerings.presents.server;
/**
* An exception class for use in concert with invocation services when
@@ -1,14 +1,14 @@
//
// $Id: AuthManager.java,v 1.4 2001/08/08 00:28:49 mdb Exp $
// $Id: AuthManager.java,v 1.5 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.server.net;
package com.threerings.presents.server.net;
import com.samskivert.util.LoopingThread;
import com.samskivert.util.Queue;
import com.threerings.cocktail.cher.Log;
import com.threerings.cocktail.cher.net.AuthRequest;
import com.threerings.cocktail.cher.net.AuthResponse;
import com.threerings.presents.Log;
import com.threerings.presents.net.AuthRequest;
import com.threerings.presents.net.AuthResponse;
/**
* The authentication manager takes care of the authentication process.
@@ -1,14 +1,14 @@
//
// $Id: AuthingConnection.java,v 1.3 2001/06/02 01:30:37 mdb Exp $
// $Id: AuthingConnection.java,v 1.4 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.server.net;
package com.threerings.presents.server.net;
import java.io.IOException;
import ninja2.core.io_core.nbio.NonblockingSocket;
import com.threerings.cocktail.cher.Log;
import com.threerings.cocktail.cher.net.UpstreamMessage;
import com.threerings.cocktail.cher.net.AuthRequest;
import com.threerings.presents.Log;
import com.threerings.presents.net.UpstreamMessage;
import com.threerings.presents.net.AuthRequest;
/**
* The authing connection manages the client connection until
@@ -1,16 +1,16 @@
//
// $Id: Connection.java,v 1.5 2001/08/03 03:09:58 mdb Exp $
// $Id: Connection.java,v 1.6 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.server.net;
package com.threerings.presents.server.net;
import java.io.*;
import ninja2.core.io_core.nbio.*;
import com.threerings.cocktail.cher.Log;
import com.threerings.cocktail.cher.io.FramedInputStream;
import com.threerings.cocktail.cher.io.TypedObjectFactory;
import com.threerings.cocktail.cher.net.UpstreamMessage;
import com.threerings.cocktail.cher.net.DownstreamMessage;
import com.threerings.presents.Log;
import com.threerings.presents.io.FramedInputStream;
import com.threerings.presents.io.TypedObjectFactory;
import com.threerings.presents.net.UpstreamMessage;
import com.threerings.presents.net.DownstreamMessage;
/**
* The base connection class implements the net event handler interface
@@ -1,7 +1,7 @@
//
// $Id: ConnectionManager.java,v 1.10 2001/10/09 18:27:25 mdb Exp $
// $Id: ConnectionManager.java,v 1.11 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.server.net;
package com.threerings.presents.server.net;
import java.io.DataOutputStream;
import java.io.IOException;
@@ -10,12 +10,12 @@ import java.util.ArrayList;
import ninja2.core.io_core.nbio.*;
import com.samskivert.util.*;
import com.threerings.cocktail.cher.Log;
import com.threerings.cocktail.cher.io.FramingOutputStream;
import com.threerings.cocktail.cher.io.TypedObjectFactory;
import com.threerings.cocktail.cher.net.Credentials;
import com.threerings.cocktail.cher.net.DownstreamMessage;
import com.threerings.cocktail.cher.server.CherServer;
import com.threerings.presents.Log;
import com.threerings.presents.io.FramingOutputStream;
import com.threerings.presents.io.TypedObjectFactory;
import com.threerings.presents.net.Credentials;
import com.threerings.presents.net.DownstreamMessage;
import com.threerings.presents.server.PresentsServer;
/**
* The connection manager manages the socket on which connections are
@@ -322,7 +322,7 @@ public class ConnectionManager extends LoopingThread
/** The config key for our listening port. */
protected static final String CM_PORT_KEY =
CherServer.CONFIG_KEY + ".conmgr_port";
PresentsServer.CONFIG_KEY + ".conmgr_port";
/** The default port on which we listen for connections. */
protected static final int DEFAULT_CM_PORT = 4007;
@@ -1,10 +1,10 @@
//
// $Id: ConnectionObserver.java,v 1.4 2001/06/02 01:30:37 mdb Exp $
// $Id: ConnectionObserver.java,v 1.5 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.server.net;
package com.threerings.presents.server.net;
import java.io.IOException;
import com.threerings.cocktail.cher.net.Credentials;
import com.threerings.presents.net.Credentials;
/**
* A connection observer can be registered with the connection manager to
@@ -1,9 +1,9 @@
//
// $Id: MessageHandler.java,v 1.1 2001/06/02 01:30:37 mdb Exp $
// $Id: MessageHandler.java,v 1.2 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.server.net;
package com.threerings.presents.server.net;
import com.threerings.cocktail.cher.net.UpstreamMessage;
import com.threerings.presents.net.UpstreamMessage;
/**
* After the connection object has parsed an entire upstream message, it
@@ -1,7 +1,7 @@
//
// $Id: NetEventHandler.java,v 1.2 2001/05/30 23:58:31 mdb Exp $
// $Id: NetEventHandler.java,v 1.3 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.server.net;
package com.threerings.presents.server.net;
import ninja2.core.io_core.nbio.Selectable;
@@ -1,11 +1,11 @@
//
// $Id: RunningConnection.java,v 1.4 2001/08/07 20:38:58 mdb Exp $
// $Id: RunningConnection.java,v 1.5 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.server.net;
package com.threerings.presents.server.net;
import java.io.IOException;
import ninja2.core.io_core.nbio.NonblockingSocket;
import com.threerings.cocktail.cher.net.UpstreamMessage;
import com.threerings.presents.net.UpstreamMessage;
/**
* A running connection object represents a fully operational client
@@ -1,7 +1,7 @@
//
// $Id: ClassUtil.java,v 1.3 2001/10/03 03:38:21 mdb Exp $
// $Id: ClassUtil.java,v 1.4 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.util;
package com.threerings.presents.util;
import java.lang.reflect.Method;
import java.util.HashMap;
@@ -9,7 +9,7 @@ import java.util.HashMap;
import com.samskivert.util.MethodFinder;
import com.samskivert.util.StringUtil;
import com.threerings.cocktail.cher.Log;
import com.threerings.presents.Log;
/**
* Class related utility functions.
@@ -1,13 +1,13 @@
//
// $Id: Invoker.java,v 1.2 2001/08/14 06:48:31 mdb Exp $
// $Id: Invoker.java,v 1.3 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.util;
package com.threerings.presents.util;
import com.samskivert.util.LoopingThread;
import com.samskivert.util.Queue;
import com.threerings.cocktail.cher.Log;
import com.threerings.cocktail.cher.server.CherServer;
import com.threerings.presents.Log;
import com.threerings.presents.server.PresentsServer;
/**
* The invoker is used to invoke self-contained units of code on an
@@ -19,7 +19,7 @@ import com.threerings.cocktail.cher.server.CherServer;
*
* <p> The invoker is a useful tool for services that need to block and
* therefore cannot be run on the distributed object thread. For example,
* a user of the Cher system might provide an invoker on which to run
* a user of the Presents system might provide an invoker on which to run
* database queries.
*
* <p> Bear in mind that each invoker instance runs units on its own
@@ -102,7 +102,7 @@ public class Invoker extends LoopingThread
if (((Unit)unit).invoke()) {
// if it returned true, we post it to the dobjmgr
// thread to invoke the result processing
CherServer.omgr.postUnit((Runnable)unit);
PresentsServer.omgr.postUnit((Runnable)unit);
}
} catch (Exception e) {
@@ -1,14 +1,14 @@
//
// $Id: PresentsContext.java,v 1.3 2001/07/21 01:06:24 mdb Exp $
// $Id: PresentsContext.java,v 1.4 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.util;
package com.threerings.presents.util;
import com.samskivert.util.Context;
import com.threerings.cocktail.cher.client.Client;
import com.threerings.cocktail.cher.dobj.DObjectManager;
import com.threerings.presents.client.Client;
import com.threerings.presents.dobj.DObjectManager;
public interface CherContext extends Context
public interface PresentsContext extends Context
{
/**
* Returns a reference to the client. This reference should be valid
@@ -1,14 +1,14 @@
//
// $Id: StreamableArrayList.java,v 1.1 2001/10/04 23:02:07 mdb Exp $
// $Id: StreamableArrayList.java,v 1.2 2001/10/11 04:07:53 mdb Exp $
package com.threerings.cocktail.cher.util;
package com.threerings.presents.util;
import java.io.IOException;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.util.ArrayList;
import com.threerings.cocktail.cher.io.Streamable;
import com.threerings.presents.io.Streamable;
/**
* Provides a means by which an ordered collection of streamable instances
@@ -17,7 +17,7 @@ import com.threerings.cocktail.cher.io.Streamable;
* object value can be supplied, but bear in mind that once the list is
* created, it's elements cannot be changed without rebroadcasting the
* entire list. It is not like a {@link
* com.threerings.cocktail.cher.dobj.DSet} which allows individual
* com.threerings.presents.dobj.DSet} which allows individual
* elements to be added or removed.
*/
public class StreamableArrayList