From 95f6bf730014f9fc2f880ed9481602cd05484865 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Wed, 3 Oct 2001 03:42:31 +0000 Subject: [PATCH] Modified client so that the invocation director is always around rather than being created after we log on because other code will want to register itself with the invocation director before we log on. The invocation director now just handles being reinitialized which is what will happen when we log off and back on. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@384 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/java/com/threerings/presents/client/Client.java | 8 ++++---- .../threerings/presents/client/InvocationDirector.java | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/java/com/threerings/presents/client/Client.java b/src/java/com/threerings/presents/client/Client.java index d3617defa..77e8b4306 100644 --- a/src/java/com/threerings/presents/client/Client.java +++ b/src/java/com/threerings/presents/client/Client.java @@ -1,5 +1,5 @@ // -// $Id: Client.java,v 1.14 2001/10/02 02:05:50 mdb Exp $ +// $Id: Client.java,v 1.15 2001/10/03 03:42:31 mdb Exp $ package com.threerings.cocktail.cher.client; @@ -277,8 +277,8 @@ public class Client // extract bootstrap information _cloid = data.clientOid; - // create our invocation director - _invdir = new InvocationDirector(this, data.invOid); + // initialize our invocation director + _invdir.init(this, data.invOid); // we can't quite call initialization completed at this point // because we need for the invocation director to fully initialize @@ -309,7 +309,7 @@ public class Client protected Communicator _comm; protected int _cloid; - protected InvocationDirector _invdir; + protected InvocationDirector _invdir = new InvocationDirector(); // client observer codes static final int CLIENT_DID_LOGON = 0; diff --git a/src/java/com/threerings/presents/client/InvocationDirector.java b/src/java/com/threerings/presents/client/InvocationDirector.java index 8bbc05525..c564af5b1 100644 --- a/src/java/com/threerings/presents/client/InvocationDirector.java +++ b/src/java/com/threerings/presents/client/InvocationDirector.java @@ -1,5 +1,5 @@ // -// $Id: InvocationDirector.java,v 1.10 2001/10/02 02:05:50 mdb Exp $ +// $Id: InvocationDirector.java,v 1.11 2001/10/03 03:42:31 mdb Exp $ package com.threerings.cocktail.cher.client; @@ -38,13 +38,13 @@ public class InvocationDirector implements Subscriber { /** - * Constructs a new invocation director with the specified invocation + * Initializes the invocation director with the specified invocation * manager oid. It will obtain its distributed object manager and * client object references from the supplied client instance. The * invocation manager oid is the oid of the object on the server to * which to deliver invocation requests. */ - public InvocationDirector (Client client, int imoid) + public void init (Client client, int imoid) { _client = client; _omgr = client.getDObjectManager();