Out with ShutdownManager, in with LifecycleManager which handles both
initialization and shutdown. This will obviate the need for a lot of manual wiring up. ShutdownManager still works and passes through to LifecycleManager, but switching to the new deal is encouraged. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5802 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -65,10 +65,10 @@ 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.PresentsSession;
|
||||
import com.threerings.presents.server.LifecycleManager;
|
||||
import com.threerings.presents.server.PresentsDObjectMgr;
|
||||
import com.threerings.presents.server.PresentsSession;
|
||||
import com.threerings.presents.server.ReportManager;
|
||||
import com.threerings.presents.server.ShutdownManager;
|
||||
import com.threerings.presents.server.net.ConnectionManager;
|
||||
|
||||
import com.threerings.presents.peer.client.PeerService;
|
||||
@@ -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, ShutdownManager.Shutdowner
|
||||
implements PeerProvider, ClientManager.ClientObserver, LifecycleManager.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 (ShutdownManager shutmgr)
|
||||
@Inject public PeerManager (LifecycleManager lifeMgr)
|
||||
{
|
||||
shutmgr.registerShutdowner(this);
|
||||
lifeMgr.addComponent(this);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -753,7 +753,7 @@ public abstract class PeerManager
|
||||
return _stats.clone();
|
||||
}
|
||||
|
||||
// from interface ShutdownManager.Shutdowner
|
||||
// from interface LifecycleManager.ShutdownComponent
|
||||
public void shutdown ()
|
||||
{
|
||||
if (_nodeName == null) { // sanity check
|
||||
|
||||
Reference in New Issue
Block a user