Moved clientObjectDidChange() into SessionObserver because anyone
observing the session is likely to need to know about that sort of thing. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1719 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: ClientController.java,v 1.15 2002/07/12 17:01:28 mdb Exp $
|
// $Id: ClientController.java,v 1.16 2002/09/20 00:54:39 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.micasa.client;
|
package com.threerings.micasa.client;
|
||||||
|
|
||||||
@@ -98,6 +98,13 @@ public class ClientController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// documentation inherited
|
||||||
|
public void clientObjectDidChange (Client client)
|
||||||
|
{
|
||||||
|
// regrab our body object
|
||||||
|
_body = (BodyObject)client.getClientObject();
|
||||||
|
}
|
||||||
|
|
||||||
// documentation inherited
|
// documentation inherited
|
||||||
public void clientDidLogoff (Client client)
|
public void clientDidLogoff (Client client)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: ClientController.java,v 1.7 2002/08/14 19:07:50 mdb Exp $
|
// $Id: ClientController.java,v 1.8 2002/09/20 00:54:39 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.micasa.simulator.client;
|
package com.threerings.micasa.simulator.client;
|
||||||
|
|
||||||
@@ -90,6 +90,13 @@ public class ClientController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// documentation inherited
|
||||||
|
public void clientObjectDidChange (Client client)
|
||||||
|
{
|
||||||
|
// regrab our body object
|
||||||
|
_body = (BodyObject)client.getClientObject();
|
||||||
|
}
|
||||||
|
|
||||||
// documentation inherited
|
// documentation inherited
|
||||||
public void clientDidLogoff (Client client)
|
public void clientDidLogoff (Client client)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: BasicDirector.java,v 1.1 2002/08/14 19:07:54 mdb Exp $
|
// $Id: BasicDirector.java,v 1.2 2002/09/20 00:54:39 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.presents.client;
|
package com.threerings.presents.client;
|
||||||
|
|
||||||
@@ -38,6 +38,11 @@ public class BasicDirector
|
|||||||
fetchServices(client);
|
fetchServices(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// documentation inherited from interface
|
||||||
|
public void clientObjectDidChange (Client client)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
// documentation inherited from interface
|
// documentation inherited from interface
|
||||||
public void clientDidLogoff (Client client)
|
public void clientDidLogoff (Client client)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: Client.java,v 1.29 2002/09/19 23:36:59 mdb Exp $
|
// $Id: Client.java,v 1.30 2002/09/20 00:54:39 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.presents.client;
|
package com.threerings.presents.client;
|
||||||
|
|
||||||
@@ -502,8 +502,8 @@ public class Client
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case CLIENT_OBJECT_CHANGED:
|
case CLIENT_OBJECT_CHANGED:
|
||||||
if (obs instanceof ClientObserver) {
|
if (obs instanceof SessionObserver) {
|
||||||
((ClientObserver)obs).clientObjectDidChange(Client.this);
|
((SessionObserver)obs).clientObjectDidChange(Client.this);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: ClientObserver.java,v 1.6 2002/09/19 23:36:59 mdb Exp $
|
// $Id: ClientObserver.java,v 1.7 2002/09/20 00:54:39 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.presents.client;
|
package com.threerings.presents.client;
|
||||||
|
|
||||||
@@ -43,14 +43,6 @@ public interface ClientObserver extends SessionObserver
|
|||||||
*/
|
*/
|
||||||
public void clientFailedToLogon (Client client, Exception cause);
|
public void clientFailedToLogon (Client client, Exception cause);
|
||||||
|
|
||||||
/**
|
|
||||||
* For systems that allow switching screen names after logon, this
|
|
||||||
* method is called whenever a screen name change takes place to
|
|
||||||
* report that the client object has been replaced to potential
|
|
||||||
* client-side subscribers.
|
|
||||||
*/
|
|
||||||
public void clientObjectDidChange (Client client);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the connection to the server went away for some
|
* Called when the connection to the server went away for some
|
||||||
* unexpected reason. This will be followed by a call to
|
* unexpected reason. This will be followed by a call to
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: SessionObserver.java,v 1.1 2002/03/11 19:51:25 mdb Exp $
|
// $Id: SessionObserver.java,v 1.2 2002/09/20 00:54:39 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.presents.client;
|
package com.threerings.presents.client;
|
||||||
|
|
||||||
@@ -24,6 +24,14 @@ public interface SessionObserver
|
|||||||
*/
|
*/
|
||||||
public void clientDidLogon (Client client);
|
public void clientDidLogon (Client client);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For systems that allow switching screen names after logon, this
|
||||||
|
* method is called whenever a screen name change takes place to
|
||||||
|
* report that the client object has been replaced to potential
|
||||||
|
* client-side subscribers.
|
||||||
|
*/
|
||||||
|
public void clientObjectDidChange (Client client);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called after the client has been logged off of the server and has
|
* Called after the client has been logged off of the server and has
|
||||||
* disconnected.
|
* disconnected.
|
||||||
|
|||||||
Reference in New Issue
Block a user