public class HttpRequestHandler extends org.jboss.netty.channel.SimpleChannelUpstreamHandler implements RelayListener, ConnectionData
| Constructor and Description |
|---|
HttpRequestHandler(org.jboss.netty.channel.socket.ClientSocketChannelFactory clientChannelFactory,
RelayPipelineFactoryFactory relayPipelineFactoryFactory)
Creates a new class for handling HTTP requests with no frills.
|
HttpRequestHandler(ProxyCacheManager cacheManager,
ProxyAuthorizationManager authorizationManager,
org.jboss.netty.channel.group.ChannelGroup channelGroup,
org.jboss.netty.channel.socket.ClientSocketChannelFactory clientChannelFactory,
RelayPipelineFactoryFactory relayPipelineFactoryFactory)
Creates a new class for handling HTTP requests with the specified
authentication manager.
|
HttpRequestHandler(ProxyCacheManager cacheManager,
ProxyAuthorizationManager authorizationManager,
org.jboss.netty.channel.group.ChannelGroup channelGroup,
org.jboss.netty.channel.socket.ClientSocketChannelFactory clientChannelFactory,
String chainProxyHostAndPort,
RelayPipelineFactoryFactory relayPipelineFactoryFactory,
boolean useJmx)
Creates a new class for handling HTTP requests with the specified
authentication manager.
|
| Modifier and Type | Method and Description |
|---|---|
void |
channelClosed(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ChannelStateEvent cse) |
void |
channelOpen(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ChannelStateEvent cse) |
void |
exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ExceptionEvent e) |
String |
getAnsweredReqeusts() |
int |
getClientConnections() |
int |
getOutgoingConnections() |
String |
getRequests() |
int |
getRequestsSent() |
int |
getResponsesReceived() |
int |
getTotalClientConnections() |
String |
getUnansweredRequests() |
void |
messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.MessageEvent me) |
void |
onChannelAvailable(String hostAndPortKey,
org.jboss.netty.channel.ChannelFuture cf) |
void |
onRelayChannelClose(org.jboss.netty.channel.Channel browserToProxyChannel,
String key,
int unansweredRequestsOnChannel,
boolean closedEndsResponseBody) |
void |
onRelayHttpResponse(org.jboss.netty.channel.Channel browserToProxyChannel,
String key,
org.jboss.netty.handler.codec.http.HttpRequest httpRequest) |
public HttpRequestHandler(org.jboss.netty.channel.socket.ClientSocketChannelFactory clientChannelFactory,
RelayPipelineFactoryFactory relayPipelineFactoryFactory)
clientChannelFactory - The common channel factory for clients.public HttpRequestHandler(ProxyCacheManager cacheManager, ProxyAuthorizationManager authorizationManager, org.jboss.netty.channel.group.ChannelGroup channelGroup, org.jboss.netty.channel.socket.ClientSocketChannelFactory clientChannelFactory, RelayPipelineFactoryFactory relayPipelineFactoryFactory)
cacheManager - The manager for the cache.authorizationManager - The class that handles any
proxy authentication requirements.channelGroup - The group of channels for keeping track of all
channels we've opened.filters - HTTP filtering rules.clientChannelFactory - The common channel factory for clients.public HttpRequestHandler(ProxyCacheManager cacheManager, ProxyAuthorizationManager authorizationManager, org.jboss.netty.channel.group.ChannelGroup channelGroup, org.jboss.netty.channel.socket.ClientSocketChannelFactory clientChannelFactory, String chainProxyHostAndPort, RelayPipelineFactoryFactory relayPipelineFactoryFactory, boolean useJmx)
cacheManager - The manager for the cache.authorizationManager - The class that handles any
proxy authentication requirements.channelGroup - The group of channels for keeping track of all
channels we've opened.filters - HTTP filtering rules.clientChannelFactory - The common channel factory for clients.chainProxyHostAndPort - upstream proxy server host and port or null
if none used.requestFilter - An optional filter for HTTP requests.useJmx - Whether or not to expose debugging properties via JMX.public void messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.MessageEvent me)
messageReceived in class org.jboss.netty.channel.SimpleChannelUpstreamHandlerpublic void onChannelAvailable(String hostAndPortKey, org.jboss.netty.channel.ChannelFuture cf)
onChannelAvailable in interface RelayListenerpublic void channelOpen(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ChannelStateEvent cse)
throws Exception
channelOpen in class org.jboss.netty.channel.SimpleChannelUpstreamHandlerExceptionpublic void channelClosed(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ChannelStateEvent cse)
channelClosed in class org.jboss.netty.channel.SimpleChannelUpstreamHandlerpublic void onRelayChannelClose(org.jboss.netty.channel.Channel browserToProxyChannel,
String key,
int unansweredRequestsOnChannel,
boolean closedEndsResponseBody)
onRelayChannelClose in interface RelayListenerpublic void onRelayHttpResponse(org.jboss.netty.channel.Channel browserToProxyChannel,
String key,
org.jboss.netty.handler.codec.http.HttpRequest httpRequest)
onRelayHttpResponse in interface RelayListenerpublic void exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ExceptionEvent e)
throws Exception
exceptionCaught in class org.jboss.netty.channel.SimpleChannelUpstreamHandlerExceptionpublic int getClientConnections()
getClientConnections in interface ConnectionDatapublic int getTotalClientConnections()
getTotalClientConnections in interface ConnectionDatapublic int getOutgoingConnections()
getOutgoingConnections in interface ConnectionDatapublic int getRequestsSent()
getRequestsSent in interface ConnectionDatapublic int getResponsesReceived()
getResponsesReceived in interface ConnectionDatapublic String getUnansweredRequests()
getUnansweredRequests in interface ConnectionDatapublic String getAnsweredReqeusts()
getAnsweredReqeusts in interface ConnectionDatapublic String getRequests()
getRequests in interface ConnectionDataCopyright © 2009–2015 LittleShoot. All rights reserved.