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.SimpleChannelUpstreamHandler
public void onChannelAvailable(String hostAndPortKey, org.jboss.netty.channel.ChannelFuture cf)
onChannelAvailable
in interface RelayListener
public void channelInterestChanged(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ChannelStateEvent cse) throws Exception
channelInterestChanged
in class org.jboss.netty.channel.SimpleChannelUpstreamHandler
Exception
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 Set<org.jboss.netty.handler.codec.http.HttpRequest> getUnansweredHttpRequests()
public String getAnsweredReqeusts()
getAnsweredReqeusts
in interface ConnectionData
public void addInterestOpsListener(InterestOpsListener opsListener)
addInterestOpsListener
in interface RelayListener
Copyright © 2009–2016 LittleShoot. All rights reserved.