Make the PeerManager and CrowdPeerManager abstract to ensure that a failure to

bind something to PeerManager.class will result in initialization failure.

A system that uses the peer services needs to extend PeerManager or
CrowdPeerManager with a concrete PeerManager and then
bind(PeerManager.class).to(SomePeerManager.class) to properly satisfy the
dependency.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5171 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2008-06-08 20:55:33 +00:00
parent 0128f6525a
commit c2d5b28b39
2 changed files with 1 additions and 5 deletions
@@ -22,7 +22,6 @@
package com.threerings.crowd.peer.server; package com.threerings.crowd.peer.server;
import com.google.inject.Inject; import com.google.inject.Inject;
import com.google.inject.Singleton;
import com.threerings.util.Name; import com.threerings.util.Name;
@@ -50,7 +49,6 @@ import com.threerings.crowd.peer.data.CrowdPeerMarshaller;
/** /**
* Extends the standard peer manager and bridges certain Crowd services. * Extends the standard peer manager and bridges certain Crowd services.
*/ */
@Singleton
public class CrowdPeerManager extends PeerManager public class CrowdPeerManager extends PeerManager
implements CrowdPeerProvider, ChatProvider.ChatForwarder implements CrowdPeerProvider, ChatProvider.ChatForwarder
{ {
@@ -34,7 +34,6 @@ import java.util.List;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.google.inject.Inject; import com.google.inject.Inject;
import com.google.inject.Singleton;
import com.samskivert.jdbc.RepositoryUnit; import com.samskivert.jdbc.RepositoryUnit;
import com.samskivert.jdbc.WriteOnlyUnit; import com.samskivert.jdbc.WriteOnlyUnit;
@@ -85,8 +84,7 @@ import static com.threerings.presents.Log.log;
* client connection to the other servers and subscribes to the {@link NodeObject} of all peer * client connection to the other servers and subscribes to the {@link NodeObject} of all peer
* servers and uses those objects to communicate cross-node information. * servers and uses those objects to communicate cross-node information.
*/ */
@Singleton public abstract class PeerManager
public class PeerManager
implements PeerProvider, ClientManager.ClientObserver, ShutdownManager.Shutdowner implements PeerProvider, ClientManager.ClientObserver, ShutdownManager.Shutdowner
{ {
/** /**