We can just inject the injector.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5843 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2009-07-01 19:02:45 +00:00
parent f80e1f07d8
commit 97befada23
@@ -215,10 +215,10 @@ public abstract class PeerManager
} }
/** /**
* Initializes this peer manager and initiates the process of connecting to its peer * Initializes this peer manager and initiates the process of connecting to its peer nodes.
* nodes. This will also reconfigure the ConnectionManager and ClientManager with peer related * This will also reconfigure the ConnectionManager and ClientManager with peer related bits,
* bits, so this should not be called until <em>after</em> the main server has set up its * so this should not be called until <em>after</em> the main server has set up its client
* client factory and authenticator. * factory and authenticator.
* *
* @param nodeName this node's unique name. * @param nodeName this node's unique name.
* @param sharedSecret a shared secret used to allow the peers to authenticate with one * @param sharedSecret a shared secret used to allow the peers to authenticate with one
@@ -229,10 +229,9 @@ public abstract class PeerManager
* network than the communication between real clients and the various peer servers). * network than the communication between real clients and the various peer servers).
* @param port the port on which other nodes should connect to us. * @param port the port on which other nodes should connect to us.
*/ */
public void init (Injector injector, String nodeName, String sharedSecret, public void init (String nodeName, String sharedSecret,
String hostName, String publicHostName, int port) String hostName, String publicHostName, int port)
{ {
_injector = injector;
_nodeName = nodeName; _nodeName = nodeName;
_sharedSecret = sharedSecret; _sharedSecret = sharedSecret;
@@ -1393,7 +1392,6 @@ public abstract class PeerManager
protected Map<String,PeerNode> _peers = Maps.newHashMap(); protected Map<String,PeerNode> _peers = Maps.newHashMap();
/** Used to resolve dependencies in unserialized {@link NodeAction} instances. */ /** Used to resolve dependencies in unserialized {@link NodeAction} instances. */
protected Injector _injector;
/** The client oids of all peers subscribed to the node object. */ /** The client oids of all peers subscribed to the node object. */
protected ArrayIntSet _suboids = new ArrayIntSet(); protected ArrayIntSet _suboids = new ArrayIntSet();
@@ -1417,6 +1415,7 @@ public abstract class PeerManager
@Inject protected @MainInvoker Invoker _invoker; @Inject protected @MainInvoker Invoker _invoker;
@Inject protected ClientManager _clmgr; @Inject protected ClientManager _clmgr;
@Inject protected ConnectionManager _conmgr; @Inject protected ConnectionManager _conmgr;
@Inject protected Injector _injector;
@Inject protected InvocationManager _invmgr; @Inject protected InvocationManager _invmgr;
@Inject protected NodeRepository _noderepo; @Inject protected NodeRepository _noderepo;
@Inject protected PresentsDObjectMgr _omgr; @Inject protected PresentsDObjectMgr _omgr;