private static class DefaultHttpProxyServer.ServerGroup extends Object
| Modifier and Type | Class and Description |
|---|---|
private class |
DefaultHttpProxyServer.ServerGroup.CategorizedThreadFactory |
| Modifier and Type | Field and Description |
|---|---|
private ChannelGroup |
allChannels
Keep track of all channels for later shutdown.
|
private Map<TransportProtocol,EventLoopGroup> |
clientToProxyBossPools
These
EventLoopGroups accept incoming connections to the
proxies. |
private Map<TransportProtocol,EventLoopGroup> |
clientToProxyWorkerPools
These
EventLoopGroups process incoming requests to the
proxies. |
private static int |
INCOMING_ACCEPTOR_THREADS |
private static int |
INCOMING_WORKER_THREADS |
private String |
name
A name for this ServerGroup to use in naming threads.
|
private static int |
OUTGOING_WORKER_THREADS |
private Map<TransportProtocol,EventLoopGroup> |
proxyToServerWorkerPools
These
EventLoopGroups are used for making outgoing
connections to servers. |
private Thread |
serverGroupShutdownHook
JVM shutdown hook to stop this server group.
|
private boolean |
stopped |
| Modifier | Constructor and Description |
|---|---|
private |
ServerGroup(String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
ensureProtocol(TransportProtocol transportProtocol) |
private void |
initializeTransport(TransportProtocol transportProtocol) |
private void |
stop(boolean graceful) |
private static final int INCOMING_ACCEPTOR_THREADS
private static final int INCOMING_WORKER_THREADS
private static final int OUTGOING_WORKER_THREADS
private final String name
private final ChannelGroup allChannels
private final Map<TransportProtocol,EventLoopGroup> clientToProxyBossPools
EventLoopGroups accept incoming connections to the
proxies. A different EventLoopGroup is used for each
TransportProtocol, since these have to be configured differently.
Thread safety: Only accessed while synchronized on the server group.private final Map<TransportProtocol,EventLoopGroup> clientToProxyWorkerPools
EventLoopGroups process incoming requests to the
proxies. A different EventLoopGroup is used for each
TransportProtocol, since these have to be configured differently.
Thread safety: Only accessed while synchronized on the server group.
*private final Map<TransportProtocol,EventLoopGroup> proxyToServerWorkerPools
EventLoopGroups are used for making outgoing
connections to servers. A different EventLoopGroup is used for each
TransportProtocol, since these have to be configured differently.private volatile boolean stopped
private final Thread serverGroupShutdownHook
private ServerGroup(String name)
public void ensureProtocol(TransportProtocol transportProtocol)
private void initializeTransport(TransportProtocol transportProtocol)
private void stop(boolean graceful)
Copyright © 2009–2015 LittleShoot. All rights reserved.