Package net.i2p.router.tunnel.pool
Class BuildHandler
java.lang.Object
net.i2p.router.tunnel.pool.BuildHandler
- All Implemented Interfaces:
Runnable
Handle the received tunnel build message requests and replies,
including sending responsses to requests, updating the
lists of our tunnels and participating tunnels,
and updating stats.
Replies are handled immediately on reception; requests are queued.
As of 0.8.11 the request queue is handled in a separate thread,
it used to be called from the BuildExecutor thread loop.
Note that 10 minute tunnel expiration is hardcoded in here.
There is only one of these objects but there may be multiple
threads running it. Instantiated and started by TunnelPoolManager.
-
Constructor Summary
ConstructorDescriptionBuildHandler
(RouterContext ctx, TunnelPoolManager manager, BuildExecutor exec) -
Method Summary
-
Constructor Details
-
BuildHandler
-
-
Method Details
-
init
void init()Call the same time you start the threads- Since:
- 0.9.18
-
restart
public void restart()- Since:
- 0.9
-
shutdown
public void shutdown(int numThreads) Cannot be restarted.- Parameters:
numThreads
- the number of threads to be shut down- Since:
- 0.9
-
run
public void run()Thread to handle inbound requests -
getInboundBuildQueueSize
public int getInboundBuildQueueSize()
-