Beginnings of invocation services implementation.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@67 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: Communicator.java,v 1.7 2001/06/09 23:39:03 mdb Exp $
|
||||
// $Id: Communicator.java,v 1.8 2001/07/19 05:56:20 mdb Exp $
|
||||
|
||||
package com.threerings.cocktail.cher.client;
|
||||
|
||||
@@ -54,14 +54,31 @@ public class Communicator
|
||||
/**
|
||||
* Returns the distributed object manager in effect for this session.
|
||||
* This instance is only valid while the client is connected to the
|
||||
* server. If we become disconnected and have to reconnect, a new omgr
|
||||
* instance should be obtained.
|
||||
* server.
|
||||
*/
|
||||
public DObjectManager getDObjectManager ()
|
||||
{
|
||||
return _omgr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the oid of the client object associated with this session.
|
||||
* It is only valid for the duration of the session.
|
||||
*/
|
||||
public int getClientOid ()
|
||||
{
|
||||
return _cloid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the invocation manager associated with this session. This
|
||||
* reference is only valid for the duration of the session.
|
||||
*/
|
||||
public InvocationManager getInvocationManager ()
|
||||
{
|
||||
return _invmgr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs on to the server and initiates our full-duplex message
|
||||
* exchange.
|
||||
@@ -155,10 +172,14 @@ public class Communicator
|
||||
Log.info("Logon succeeded: " + data);
|
||||
|
||||
// extract bootstrap information
|
||||
_cloid = data.clientOid;
|
||||
|
||||
// create our distributed object manager
|
||||
_omgr = new ClientDObjectMgr(this, _client);
|
||||
|
||||
// create our invocation manager
|
||||
_invmgr = new InvocationManager(_client, data.invOid);
|
||||
|
||||
// create a new writer thread and start it up
|
||||
if (_writer != null) {
|
||||
throw new RuntimeException("Writer already started!?");
|
||||
@@ -481,4 +502,6 @@ public class Communicator
|
||||
protected DataInputStream _din;
|
||||
|
||||
protected ClientDObjectMgr _omgr;
|
||||
protected int _cloid;
|
||||
protected InvocationManager _invmgr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user