use of net.i2p.router.message.GarlicMessageParser in project i2p.i2p by i2p.
the class RouterContext method initAll.
/**
* The following properties may be used to replace various parts
* of the context with dummy implementations for testing, by setting
* the property to "true":
*<pre>
* i2p.dummyClientFacade
* i2p.dummyNetDb
* i2p.dummyPeerManager
* i2p.dummyTunnelManager
* i2p.vmCommSystem (transport)
*</pre>
*/
public synchronized void initAll() {
if (_initialized)
throw new IllegalStateException();
if (!getBooleanProperty("i2p.dummyClientFacade")) {
ClientManagerFacadeImpl cmfi = new ClientManagerFacadeImpl(this);
_clientManagerFacade = cmfi;
_internalClientManager = cmfi;
} else {
_clientManagerFacade = new DummyClientManagerFacade(this);
// internal client manager is null
}
_garlicMessageParser = new GarlicMessageParser(this);
_clientMessagePool = new ClientMessagePool(this);
_jobQueue = new JobQueue(this);
_jobQueue.startup();
_inNetMessagePool = new InNetMessagePool(this);
_outNetMessagePool = new OutNetMessagePool(this);
_messageHistory = new MessageHistory(this);
_messageRegistry = new OutboundMessageRegistry(this);
// _messageStateMonitor = new MessageStateMonitor(this);
_routingKeyGenerator = new RouterKeyGenerator(this);
if (!getBooleanProperty("i2p.dummyNetDb"))
// new KademliaNetworkDatabaseFacade(this);
_netDb = new FloodfillNetworkDatabaseFacade(this);
else
_netDb = new DummyNetworkDatabaseFacade(this);
_keyManager = new KeyManager(this);
if (!getBooleanProperty("i2p.vmCommSystem"))
_commSystem = new CommSystemFacadeImpl(this);
else
_commSystem = new VMCommSystem(this);
_profileOrganizer = new ProfileOrganizer(this);
if (!getBooleanProperty("i2p.dummyPeerManager"))
_peerManagerFacade = new PeerManagerFacadeImpl(this);
else
_peerManagerFacade = new DummyPeerManagerFacade();
_profileManager = new ProfileManagerImpl(this);
_bandwidthLimiter = new FIFOBandwidthLimiter(this);
if (!getBooleanProperty("i2p.dummyTunnelManager"))
_tunnelManager = new TunnelPoolManager(this);
else
_tunnelManager = new DummyTunnelManagerFacade();
_tunnelDispatcher = new TunnelDispatcher(this);
_statPublisher = new StatisticsManager(this);
_banlist = new Banlist(this);
_blocklist = new Blocklist(this);
_messageValidator = new MessageValidator(this);
_throttle = new RouterThrottleImpl(this);
// _throttle = new RouterDoSThrottle(this);
_appManager = new RouterAppManager(this);
_initialized = true;
}
Aggregations