rabbit.proxy
Class SSLHandler

java.lang.Object
  extended by rabbit.proxy.SSLHandler

public class SSLHandler
extends Object

A handler that shuttles ssl traffic

Author:
Robert Olofsson

Constructor Summary
SSLHandler(HttpProxy proxy, Connection con, HttpHeader request, TrafficLoggerHandler tlh)
          Create a new SSLHandler
 
Method Summary
 void handle(SocketChannel channel, BufferHandle bh)
          handle the tunnel.
 boolean isAllowed()
          Are we allowed to proxy ssl-type connections ?
 void tunnelClosed()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SSLHandler

public SSLHandler(HttpProxy proxy,
                  Connection con,
                  HttpHeader request,
                  TrafficLoggerHandler tlh)
Create a new SSLHandler

Parameters:
proxy - the HttpProxy this SSL connection is serving
con - the Connection to handle
request - the CONNECT header
tlh - the traffic statistics gatherer
Method Detail

isAllowed

public boolean isAllowed()
Are we allowed to proxy ssl-type connections ?

Returns:
true if we allow the CONNECT <port> command.

handle

public void handle(SocketChannel channel,
                   BufferHandle bh)
handle the tunnel.

Parameters:
channel - the client channel
bh - the buffer handle used, may contain data from client.

tunnelClosed

public void tunnelClosed()