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.SimpleChannelUpstreamHandler
public void onChannelAvailable(String hostAndPortKey, org.jboss.netty.channel.ChannelFuture cf)
onChannelAvailable
in interface RelayListener
public void channelOpen(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ChannelStateEvent cse) throws Exception
channelOpen
in class org.jboss.netty.channel.SimpleChannelUpstreamHandler
Exception
public void channelClosed(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ChannelStateEvent cse)
channelClosed
in class org.jboss.netty.channel.SimpleChannelUpstreamHandler
public void onRelayChannelClose(org.jboss.netty.channel.Channel browserToProxyChannel, String key, int unansweredRequestsOnChannel, boolean closedEndsResponseBody)
onRelayChannelClose
in interface RelayListener
public void onRelayHttpResponse(org.jboss.netty.channel.Channel browserToProxyChannel, String key, org.jboss.netty.handler.codec.http.HttpRequest httpRequest)
onRelayHttpResponse
in interface RelayListener
public void exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ExceptionEvent e) throws Exception
exceptionCaught
in class org.jboss.netty.channel.SimpleChannelUpstreamHandler
Exception
public int getClientConnections()
getClientConnections
in interface ConnectionData
public int getTotalClientConnections()
getTotalClientConnections
in interface ConnectionData
public int getOutgoingConnections()
getOutgoingConnections
in interface ConnectionData
public int getRequestsSent()
getRequestsSent
in interface ConnectionData
public int getResponsesReceived()
getResponsesReceived
in interface ConnectionData
public String getUnansweredRequests()
getUnansweredRequests
in interface ConnectionData
public String getAnsweredReqeusts()
getAnsweredReqeusts
in interface ConnectionData
public String getRequests()
getRequests
in interface ConnectionData
Copyright © 2009-2012 LittleShoot. All Rights Reserved.