public interface ChainedProxy extends SslEngineSource
Encapsulates information needed to connect to a chained proxy.
Sub-classes may wish to extend ChainedProxyAdapter for sensible
defaults.
| Modifier and Type | Method and Description |
|---|---|
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(HttpObject httpObject)
Filters requests on their way to the chained proxy.
|
InetSocketAddress |
getChainedProxyAddress()
Return the
InetSocketAddress for connecting to the chained proxy. |
ChainedProxyType |
getChainedProxyType()
Tell LittleProxy the type of chained proxy that it will be
connecting to.
|
InetSocketAddress |
getLocalAddress()
(Optional) ensure that the connection is opened from a specific local
address (useful when doing NAT traversal).
|
String |
getPassword()
(Optional) implement this method if the chained proxy requires
a password.
|
TransportProtocol |
getTransportProtocol()
Tell LittleProxy what kind of TransportProtocol to use to communicate
with the chained proxy.
|
String |
getUsername()
(Optional) implement this method if the chained proxy requires
a username.
|
boolean |
requiresEncryption()
Implement this method to tell LittleProxy whether or not to encrypt
connections to the chained proxy for the given request.
|
newSslEngine, newSslEngineInetSocketAddress getChainedProxyAddress()
InetSocketAddress for connecting to the chained proxy.
Returning null indicates that we won't chain.InetSocketAddress getLocalAddress()
TransportProtocol getTransportProtocol()
ChainedProxyType getChainedProxyType()
String getUsername()
String getPassword()
boolean requiresEncryption()
SslEngineSource.newSslEngine() to obtain an
SSLContext used by the downstream proxy.void filterRequest(HttpObject httpObject)
void connectionSucceeded()
void connectionFailed(Throwable cause)
cause - exception that caused this failure (may be null)void disconnected()
Copyright © 2009–2021. All rights reserved.