java.lang.Object
net.i2p.router.ClientMessagePool
Manage all of the inbound and outbound client messages maintained by the router. The ClientManager subsystem fetches messages from this for locally deliverable messages and adds in remotely deliverable messages. Remotely deliverable messages are picked up by interested jobs and processed and transformed into an OutNetMessage to be eventually placed in the OutNetMessagePool.
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final OutboundCacheMessages waiting for their tunnel's reply.private final RouterContextThe router context the pool runs in.private final LogLogger for this class.Constructor Summary
ConstructorsMethod Summary
All MethodsModifier and TypeMethodDescriptionvoidadd(ClientMessage msg) Add a new client message to the pool.voidadd(ClientMessage msg, boolean isDefinitelyRemote) Add a new client message with knowledge of whether it's remote.getCache()The outbound cache for this message pool.voidrestart()Restart the client message pool.voidshutdown()Shutdown the client message pool and clear all caches.
Field Details
_log
Logger for this class._context
The router context the pool runs in._cache
Messages waiting for their tunnel's reply.
Constructor Details
ClientMessagePool
Create a new ClientMessagePool.- Parameters:
context- the router context
Method Details
getCache
The outbound cache for this message pool.- Returns:
- the OutboundCache instance
shutdown
public void shutdown()Shutdown the client message pool and clear all caches.restart
public void restart()Restart the client message pool.add
Add a new client message to the pool. The message is either locally or remotely destined.- Parameters:
msg- the ClientMessage to add
add
Add a new client message with knowledge of whether it's remote.If we're coming from the client subsystem itself, we already know whether the target is definitely remote and as such don't need to recheck ourselves, but if we aren't certain, we want it to check for us.
- Parameters:
msg- the ClientMessage to addisDefinitelyRemote- true if we know for sure that the target is not local