Class BuildHandler

  • All Implemented Interfaces:
    Runnable

    class BuildHandler
    extends Object
    implements 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.
    • Method Detail

      • 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
        Specified by:
        run in interface Runnable
        Since:
        0.8.11
      • getInboundBuildQueueSize

        public int getInboundBuildQueueSize()