org.littleshoot.proxy
Class HttpConnectRelayingHandler

java.lang.Object
  org.jboss.netty.channel.SimpleChannelUpstreamHandler
      org.littleshoot.proxy.HttpConnectRelayingHandler
All Implemented Interfaces:
org.jboss.netty.channel.ChannelHandler, org.jboss.netty.channel.ChannelUpstreamHandler

@ChannelHandler.Sharable
public class HttpConnectRelayingHandler
extends org.jboss.netty.channel.SimpleChannelUpstreamHandler

Class that simply relays traffic the channel this is connected to to another channel passed in to the constructor.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler
org.jboss.netty.channel.ChannelHandler.Sharable
 
Constructor Summary
HttpConnectRelayingHandler(org.jboss.netty.channel.Channel relayChannel, org.jboss.netty.channel.group.ChannelGroup channelGroup)
          Creates a new HttpConnectRelayingHandler with the specified connection to relay to..
 
Method Summary
 void channelClosed(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ChannelStateEvent e)
           
 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)
           
 void messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.MessageEvent e)
           
 
Methods inherited from class org.jboss.netty.channel.SimpleChannelUpstreamHandler
channelBound, channelConnected, channelDisconnected, channelInterestChanged, channelUnbound, childChannelClosed, childChannelOpen, handleUpstream, writeComplete
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpConnectRelayingHandler

public HttpConnectRelayingHandler(org.jboss.netty.channel.Channel relayChannel,
                                  org.jboss.netty.channel.group.ChannelGroup channelGroup)
Creates a new HttpConnectRelayingHandler with the specified connection to relay to..

Parameters:
relayChannel - The channel to relay messages to.
channelGroup - The group of channels to close on shutdown.
Method Detail

messageReceived

public void messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx,
                            org.jboss.netty.channel.MessageEvent e)
                     throws Exception
Overrides:
messageReceived in class org.jboss.netty.channel.SimpleChannelUpstreamHandler
Throws:
Exception

channelOpen

public void channelOpen(org.jboss.netty.channel.ChannelHandlerContext ctx,
                        org.jboss.netty.channel.ChannelStateEvent cse)
                 throws Exception
Overrides:
channelOpen in class org.jboss.netty.channel.SimpleChannelUpstreamHandler
Throws:
Exception

channelClosed

public void channelClosed(org.jboss.netty.channel.ChannelHandlerContext ctx,
                          org.jboss.netty.channel.ChannelStateEvent e)
                   throws Exception
Overrides:
channelClosed in class org.jboss.netty.channel.SimpleChannelUpstreamHandler
Throws:
Exception

exceptionCaught

public void exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx,
                            org.jboss.netty.channel.ExceptionEvent e)
                     throws Exception
Overrides:
exceptionCaught in class org.jboss.netty.channel.SimpleChannelUpstreamHandler
Throws:
Exception


Copyright © 2009-2011 LittleShoot. All Rights Reserved.