Add a single method that we call in the various circumstances where our

client object has been updated so that the 90% of the directors that just
need to know any time that sort of thing happens so that they can listen
on the current client object can easily and robustly do so.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2907 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2003-12-11 21:36:12 +00:00
parent f93c87cfb2
commit 62e0e9cf37
@@ -1,5 +1,5 @@
//
// $Id: BasicDirector.java,v 1.2 2002/09/20 00:54:39 mdb Exp $
// $Id: BasicDirector.java,v 1.3 2003/12/11 21:36:12 mdb Exp $
package com.threerings.presents.client;
@@ -29,6 +29,7 @@ public class BasicDirector
// if we're already logged on, fire off a call to fetch services
if (client.isLoggedOn()) {
fetchServices(client);
clientObjectUpdated(client);
}
}
@@ -36,11 +37,13 @@ public class BasicDirector
public void clientDidLogon (Client client)
{
fetchServices(client);
clientObjectUpdated(client);
}
// documentation inherited from interface
public void clientObjectDidChange (Client client)
{
clientObjectUpdated(client);
}
// documentation inherited from interface
@@ -48,6 +51,15 @@ public class BasicDirector
{
}
/**
* Called in three circumstances: when a director is created and we've
* already logged on; when we first log on and when the client object
* changes after we've already logged on.
*/
protected void clientObjectUpdated (Client client)
{
}
/**
* Derived directors can override this method and obtain any services
* they'll need during their operation via calls to {@link