org.littleshoot.proxy
Interface ChainedProxy

All Superinterfaces:
SslEngineSource
All Known Implementing Classes:
ChainedProxyAdapter

public interface ChainedProxy
extends SslEngineSource

Encapsulates information needed to connect to a chained proxy.

Sub-classes may wish to extend ChainedProxyAdapter for sensible defaults.


Method Summary
 void connectionFailed(Throwable cause)
          Called to let us know that connecting to this proxy failed.
 void connectionSucceeded()
          Called to let us know that connecting to this proxy succeeded.
 void disconnected()
          Called to let us know that we were disconnected.
 void filterRequest(io.netty.handler.codec.http.HttpObject httpObject)
          Filters requests on their way to the chained proxy.
 InetSocketAddress getChainedProxyAddress()
          Return the InetSocketAddress for connecting to the chained proxy.
 InetSocketAddress getLocalAddress()
          (Optional) ensure that the connection is opened from a specific local address (useful when doing NAT traversal).
 TransportProtocol getTransportProtocol()
          Tell LittleProxy what kind of TransportProtocol to use to communicate with the chained proxy.
 boolean requiresEncryption()
          Implement this method to tell LittleProxy whether or not to encrypt connections to the chained proxy for the given request.
 
Methods inherited from interface org.littleshoot.proxy.SslEngineSource
newSslEngine
 

Method Detail

getChainedProxyAddress

InetSocketAddress getChainedProxyAddress()
Return the InetSocketAddress for connecting to the chained proxy. Returning null indicates that we won't chain.

Returns:
The Chain Proxy with Host and Port.

getLocalAddress

InetSocketAddress getLocalAddress()
(Optional) ensure that the connection is opened from a specific local address (useful when doing NAT traversal).

Returns:

getTransportProtocol

TransportProtocol getTransportProtocol()
Tell LittleProxy what kind of TransportProtocol to use to communicate with the chained proxy.

Returns:

requiresEncryption

boolean requiresEncryption()
Implement this method to tell LittleProxy whether or not to encrypt connections to the chained proxy for the given request. If true, LittleProxy will call SslEngineSource.newSslEngine() to obtain an SSLContext used by the downstream proxy.

Returns:
true of the connection to the chained proxy should be encrypted

filterRequest

void filterRequest(io.netty.handler.codec.http.HttpObject httpObject)
Filters requests on their way to the chained proxy.

Parameters:
httpObject -

connectionSucceeded

void connectionSucceeded()
Called to let us know that connecting to this proxy succeeded.


connectionFailed

void connectionFailed(Throwable cause)
Called to let us know that connecting to this proxy failed.

Parameters:
cause - exception that caused this failure (may be null)

disconnected

void disconnected()
Called to let us know that we were disconnected.



Copyright © 2009-2014 LittleShoot. All Rights Reserved.