|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.littleshoot.proxy.ChainedProxyAdapter
public class ChainedProxyAdapter
Convenience base class for implementations of ChainedProxy.
| Field Summary | |
|---|---|
static ChainedProxy |
FALLBACK_TO_DIRECT_CONNECTION
ChainedProxy that simply has the downstream proxy make a direct
connection to the upstream server. |
| Constructor Summary | |
|---|---|
ChainedProxyAdapter()
|
|
| 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. |
SSLEngine |
newSslEngine()
|
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 class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static ChainedProxy FALLBACK_TO_DIRECT_CONNECTION
ChainedProxy that simply has the downstream proxy make a direct
connection to the upstream server.
| Constructor Detail |
|---|
public ChainedProxyAdapter()
| Method Detail |
|---|
public InetSocketAddress getChainedProxyAddress()
ChainedProxyInetSocketAddress for connecting to the chained proxy.
Returning null indicates that we won't chain.
getChainedProxyAddress in interface ChainedProxypublic InetSocketAddress getLocalAddress()
ChainedProxy
getLocalAddress in interface ChainedProxypublic TransportProtocol getTransportProtocol()
ChainedProxy
getTransportProtocol in interface ChainedProxypublic boolean requiresEncryption()
ChainedProxySslEngineSource.newSslEngine() to obtain an
SSLContext used by the downstream proxy.
requiresEncryption in interface ChainedProxypublic SSLEngine newSslEngine()
newSslEngine in interface SslEngineSourcepublic void filterRequest(io.netty.handler.codec.http.HttpObject httpObject)
ChainedProxy
filterRequest in interface ChainedProxypublic void connectionSucceeded()
ChainedProxy
connectionSucceeded in interface ChainedProxypublic void connectionFailed(Throwable cause)
ChainedProxy
connectionFailed in interface ChainedProxycause - exception that caused this failure (may be null)public void disconnected()
ChainedProxy
disconnected in interface ChainedProxy
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||