public class HttpRequestHandler extends org.jboss.netty.channel.SimpleChannelUpstreamHandler implements RelayListener, ConnectionData
| Constructor and Description |
|---|
HttpRequestHandler(ProxyCacheManager cacheManager,
ProxyAuthorizationManager authorizationManager,
org.jboss.netty.channel.group.ChannelGroup channelGroup,
ChainProxyManager chainProxyManager,
RelayPipelineFactoryFactory relayPipelineFactoryFactory,
org.jboss.netty.channel.socket.ClientSocketChannelFactory clientChannelFactory)
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,
RelayPipelineFactoryFactory relayPipelineFactoryFactory,
org.jboss.netty.channel.socket.ClientSocketChannelFactory clientChannelFactory)
Creates a new class for handling HTTP requests with the specified
authentication manager.
|
HttpRequestHandler(RelayPipelineFactoryFactory relayPipelineFactoryFactory,
org.jboss.netty.channel.socket.ClientSocketChannelFactory clientChannelFactory)
Creates a new class for handling HTTP requests with no frills.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addInterestOpsListener(InterestOpsListener opsListener) |
void |
channelClosed(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ChannelStateEvent cse) |
void |
channelInterestChanged(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) |
protected void |
cleanupJmx() |
void |
exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ExceptionEvent e) |
String |
getAnsweredReqeusts() |
int |
getClientConnections() |
int |
getOutgoingConnections() |
int |
getRequestsSent() |
int |
getResponsesReceived() |
int |
getTotalClientConnections() |
Set<org.jboss.netty.handler.codec.http.HttpRequest> |
getUnansweredHttpRequests() |
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)
This is called when a relay channel to a remote server is closed in order
for this class to perform any necessary cleanup.
|
void |
onRelayHttpResponse(org.jboss.netty.channel.Channel browserToProxyChannel,
String key,
org.jboss.netty.handler.codec.http.HttpRequest httpRequest) |
public HttpRequestHandler(RelayPipelineFactoryFactory relayPipelineFactoryFactory, org.jboss.netty.channel.socket.ClientSocketChannelFactory clientChannelFactory)
relayPipelineFactoryFactory - The factory for creating factories
for channels to relay data from external sites back to clients.clientChannelFactory - The factory for creating outgoing channels
to external sites.public HttpRequestHandler(ProxyCacheManager cacheManager, ProxyAuthorizationManager authorizationManager, org.jboss.netty.channel.group.ChannelGroup channelGroup, RelayPipelineFactoryFactory relayPipelineFactoryFactory, org.jboss.netty.channel.socket.ClientSocketChannelFactory clientChannelFactory)
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.relayPipelineFactoryFactory - The factory for creating factories
for channels to relay data from external sites back to clients.clientChannelFactory - The factory for creating outgoing channels
to external sites.public HttpRequestHandler(ProxyCacheManager cacheManager, ProxyAuthorizationManager authorizationManager, org.jboss.netty.channel.group.ChannelGroup channelGroup, ChainProxyManager chainProxyManager, RelayPipelineFactoryFactory relayPipelineFactoryFactory, org.jboss.netty.channel.socket.ClientSocketChannelFactory clientChannelFactory)
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.chainProxyManager - upstream proxy server host and port or null
if none used.relayPipelineFactoryFactory - The relay pipeline factory.clientChannelFactory - The factory for creating outgoing channels
to external sites.protected void cleanupJmx()
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 channelInterestChanged(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ChannelStateEvent cse)
throws Exception
channelInterestChanged in class org.jboss.netty.channel.SimpleChannelUpstreamHandlerExceptionpublic 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 Set<org.jboss.netty.handler.codec.http.HttpRequest> getUnansweredHttpRequests()
public String getAnsweredReqeusts()
getAnsweredReqeusts in interface ConnectionDatapublic void addInterestOpsListener(InterestOpsListener opsListener)
addInterestOpsListener in interface RelayListenerCopyright © 2009-2013 LittleShoot. All Rights Reserved.