Have the invocation manager pass the client object back to the client when
it is ready. Then the client hangs on to it because the invocation manager doesn't really need to hang on to the client object. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@288 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: Client.java,v 1.12 2001/08/21 00:58:10 mdb Exp $
|
||||
// $Id: Client.java,v 1.13 2001/08/21 19:33:06 mdb Exp $
|
||||
|
||||
package com.threerings.cocktail.cher.client;
|
||||
|
||||
@@ -174,7 +174,7 @@ public class Client
|
||||
*/
|
||||
public ClientObject getClientObject ()
|
||||
{
|
||||
return _invmgr.getClientObject();
|
||||
return _clobj;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -286,14 +286,18 @@ public class Client
|
||||
// client loose to do things like request invocation services
|
||||
}
|
||||
|
||||
void invocationManagerReady ()
|
||||
void invocationManagerReady (ClientObject clobj)
|
||||
{
|
||||
// keep this around
|
||||
_clobj = clobj;
|
||||
|
||||
// let the client know that logon has now fully succeeded
|
||||
notifyObservers(Client.CLIENT_DID_LOGON, null);
|
||||
}
|
||||
|
||||
protected Credentials _creds;
|
||||
protected Invoker _invoker;
|
||||
protected ClientObject _clobj;
|
||||
|
||||
protected String _hostname;
|
||||
protected int _port;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: InvocationDirector.java,v 1.8 2001/08/21 00:58:10 mdb Exp $
|
||||
// $Id: InvocationDirector.java,v 1.9 2001/08/21 19:33:06 mdb Exp $
|
||||
|
||||
package com.threerings.cocktail.cher.client;
|
||||
|
||||
@@ -120,7 +120,7 @@ public class InvocationManager
|
||||
{
|
||||
// let the client know that we're ready to go now that we've got
|
||||
// our subscription to the client object
|
||||
_client.invocationManagerReady();
|
||||
_client.invocationManagerReady((ClientObject)object);
|
||||
}
|
||||
|
||||
public void requestFailed (int oid, ObjectAccessException cause)
|
||||
@@ -250,15 +250,6 @@ public class InvocationManager
|
||||
return _invocationId++;
|
||||
}
|
||||
|
||||
/**
|
||||
* Access to the client object so that the client instance doesn't
|
||||
* have to subscribe to it just to make it available.
|
||||
*/
|
||||
protected ClientObject getClientObject ()
|
||||
{
|
||||
return _clobj;
|
||||
}
|
||||
|
||||
protected static class Response
|
||||
{
|
||||
public String name;
|
||||
@@ -273,7 +264,6 @@ public class InvocationManager
|
||||
protected Client _client;
|
||||
protected DObjectManager _omgr;
|
||||
protected int _imoid;
|
||||
protected ClientObject _clobj;
|
||||
|
||||
protected int _invocationId;
|
||||
protected IntMap _targets = new IntMap();
|
||||
|
||||
Reference in New Issue
Block a user