Class ProxyThreadPools

java.lang.Object
org.littleshoot.proxy.impl.ProxyThreadPools

public class ProxyThreadPools extends Object
Encapsulates the thread pools used by the proxy. Contains the acceptor thread pool as well as the client-to-proxy and proxy-to-server thread pools.
  • Field Details

    • clientToProxyAcceptorPool

      private final NioEventLoopGroup clientToProxyAcceptorPool
      These EventLoopGroups accept incoming connections to the proxies. A different EventLoopGroup is used for each TransportProtocol, since these have to be configured differently.
    • clientToProxyWorkerPool

      private final NioEventLoopGroup clientToProxyWorkerPool
      These EventLoopGroups process incoming requests to the proxies. A different EventLoopGroup is used for each TransportProtocol, since these have to be configured differently.
    • proxyToServerWorkerPool

      private final NioEventLoopGroup proxyToServerWorkerPool
      These EventLoopGroups are used for making outgoing connections to servers. A different EventLoopGroup is used for each TransportProtocol, since these have to be configured differently.
  • Constructor Details

    • ProxyThreadPools

      public ProxyThreadPools(SelectorProvider selectorProvider, int incomingAcceptorThreads, int incomingWorkerThreads, int outgoingWorkerThreads, String serverGroupName, int serverGroupId)
  • Method Details

    • getAllEventLoops

      public List<EventLoopGroup> getAllEventLoops()
      Returns all event loops (acceptor and worker thread pools) in this pool.
    • getClientToProxyAcceptorPool

      public NioEventLoopGroup getClientToProxyAcceptorPool()
    • getClientToProxyWorkerPool

      public NioEventLoopGroup getClientToProxyWorkerPool()
    • getProxyToServerWorkerPool

      public NioEventLoopGroup getProxyToServerWorkerPool()