Let's make the Lifecycle a bit more abstract and decouple it from all the

server business. I'd move the whole kit and kaboodle to samskivert but that
would mean moving the DependencyGraph as well...


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5804 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2009-05-27 19:09:47 +00:00
parent d855eb184a
commit e87c86dc2c
12 changed files with 81 additions and 87 deletions
@@ -49,6 +49,7 @@ import com.threerings.io.ObjectInputStream;
import com.threerings.io.ObjectOutputStream;
import com.threerings.io.Streamable;
import com.threerings.util.Lifecycle;
import com.threerings.util.Name;
import com.threerings.presents.dobj.DObject;
@@ -65,7 +66,6 @@ import com.threerings.presents.data.ClientObject;
import com.threerings.presents.server.ClientManager;
import com.threerings.presents.server.InvocationException;
import com.threerings.presents.server.InvocationManager;
import com.threerings.presents.server.LifecycleManager;
import com.threerings.presents.server.PresentsDObjectMgr;
import com.threerings.presents.server.PresentsSession;
import com.threerings.presents.server.ReportManager;
@@ -86,7 +86,7 @@ import static com.threerings.presents.Log.log;
* servers and uses those objects to communicate cross-node information.
*/
public abstract class PeerManager
implements PeerProvider, ClientManager.ClientObserver, LifecycleManager.ShutdownComponent
implements PeerProvider, ClientManager.ClientObserver, Lifecycle.ShutdownComponent
{
/**
* Used by entities that wish to know when cached data has become stale due to a change on
@@ -198,9 +198,9 @@ public abstract class PeerManager
/**
* Creates an uninitialized peer manager.
*/
@Inject public PeerManager (LifecycleManager lifeMgr)
@Inject public PeerManager (Lifecycle cycle)
{
lifeMgr.addComponent(this);
cycle.addComponent(this);
}
/**
@@ -753,7 +753,7 @@ public abstract class PeerManager
return _stats.clone();
}
// from interface LifecycleManager.ShutdownComponent
// from interface Lifecycle.ShutdownComponent
public void shutdown ()
{
if (_nodeName == null) { // sanity check