Moved the typed object registry into the same package with the rest of

the typed object stuff; made events typed so they can be transported;
further wiring up of event dispatch over the network.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@34 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2001-06-11 17:44:04 +00:00
parent a8bddf0238
commit 89083f4708
11 changed files with 183 additions and 43 deletions
@@ -1,5 +1,5 @@
//
// $Id: Client.java,v 1.5 2001/06/09 23:39:03 mdb Exp $
// $Id: Client.java,v 1.6 2001/06/11 17:44:03 mdb Exp $
package com.threerings.cocktail.cher.client;
@@ -9,7 +9,6 @@ import java.util.List;
import com.threerings.cocktail.cher.Log;
import com.threerings.cocktail.cher.dobj.DObjectManager;
import com.threerings.cocktail.cher.net.Credentials;
import com.threerings.cocktail.cher.net.Registry;
/**
* Through the client object, a connection to the system is established
@@ -243,9 +242,4 @@ public class Client
static final int CLIENT_CONNECTION_FAILED = 2;
static final int CLIENT_WILL_LOGOFF = 3;
static final int CLIENT_DID_LOGOFF = 4;
// register our shared objects
static {
Registry.registerTypedObjects();
}
}
@@ -1,5 +1,5 @@
//
// $Id: ClientDObjectMgr.java,v 1.1 2001/06/09 23:39:03 mdb Exp $
// $Id: ClientDObjectMgr.java,v 1.2 2001/06/11 17:44:04 mdb Exp $
package com.threerings.cocktail.cher.client;
@@ -69,8 +69,13 @@ public class ClientDObjectMgr
// inherit documentation from the interface
public void postEvent (DEvent event)
{
// we can cast the event to a typed event because only typed
// events will be kicking around on the client; bare DEvent
// instances are only used for internal messages on the server
TypedEvent tevent = (TypedEvent)event;
// send a forward event request to the server
_comm.postMessage(new ForwardEventRequest(event));
_comm.postMessage(new ForwardEventRequest(tevent));
}
/**