Package org.littleshoot.proxy.impl
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 Summary
Fields Modifier and Type Field Description private NioEventLoopGroupclientToProxyAcceptorPoolTheseEventLoopGroups accept incoming connections to the proxies.private NioEventLoopGroupclientToProxyWorkerPoolTheseEventLoopGroups process incoming requests to the proxies.private NioEventLoopGroupproxyToServerWorkerPoolTheseEventLoopGroups are used for making outgoing connections to servers.
-
Constructor Summary
Constructors Constructor Description ProxyThreadPools(SelectorProvider selectorProvider, int incomingAcceptorThreads, int incomingWorkerThreads, int outgoingWorkerThreads, String serverGroupName, int serverGroupId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<EventLoopGroup>getAllEventLoops()Returns all event loops (acceptor and worker thread pools) in this pool.NioEventLoopGroupgetClientToProxyAcceptorPool()NioEventLoopGroupgetClientToProxyWorkerPool()NioEventLoopGroupgetProxyToServerWorkerPool()
-
-
-
Field Detail
-
clientToProxyAcceptorPool
private final NioEventLoopGroup clientToProxyAcceptorPool
TheseEventLoopGroups 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
TheseEventLoopGroups 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
TheseEventLoopGroups are used for making outgoing connections to servers. A different EventLoopGroup is used for each TransportProtocol, since these have to be configured differently.
-
-
Constructor Detail
-
ProxyThreadPools
public ProxyThreadPools(SelectorProvider selectorProvider, int incomingAcceptorThreads, int incomingWorkerThreads, int outgoingWorkerThreads, String serverGroupName, int serverGroupId)
-
-
Method Detail
-
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()
-
-