GeezerVison is showing netty.io — ProxyHandler (Netty API Reference (4.1.141.Final))
Class ProxyHandler
-
-
Constructor Summary
Constructors
Modifier
Constructor
Description
protected
-
Method Summary
Modifier and Type
Method
Description
protected abstract void
Adds the codec handlers required to communicate with the proxy server.
Returns the name of the authentication scheme in use.
final void
final void
final void
final void
final void
Returns a Future that is notified when the connection to the destination has been established
or the connection attempt has failed.
final long
Returns the connect timeout in millis.
Returns the address of the destination to connect to via the proxy server.
final void
Decorates the specified exception message with the common information such as the current protocol,
authentication scheme, proxy address, and destination address.
final void
final void
Do nothing by default, sub-classes may override this method.
protected abstract boolean
Handles the message received from the proxy server.
void
Do nothing by default, sub-classes may override this method.
final boolean
Returns true if and only if the connection to the destination has been established successfully.
Returns a new message that is sent at first time when the connection to the proxy server has been established.
Returns the name of the proxy protocol in use.
Returns the address of the proxy server.
protected abstract void
protected abstract void
protected final void
Sends the specified message to the proxy server.
final void
Sets the connect timeout in millis.
final void
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Details
-
protocol
public abstract String protocol()
Returns the name of the proxy protocol in use.
-
authScheme
public abstract String authScheme()
Returns the name of the authentication scheme in use.
-
proxyAddress
Returns the address of the proxy server.
-
destinationAddress
Returns the address of the destination to connect to via the proxy server.
-
isConnected
public final boolean isConnected()
Returns true if and only if the connection to the destination has been established successfully.
-
connectFuture
Returns a Future that is notified when the connection to the destination has been established
or the connection attempt has failed.
-
connectTimeoutMillis
public final long connectTimeoutMillis()
Returns the connect timeout in millis. If the connection attempt to the destination does not finish within
the timeout, the connection attempt will be failed.
-
setConnectTimeoutMillis
public final void setConnectTimeoutMillis(long connectTimeoutMillis)
Sets the connect timeout in millis. If the connection attempt to the destination does not finish within
the timeout, the connection attempt will be failed.
-
-
-
addCodec
Adds the codec handlers required to communicate with the proxy server.
- Throws:
Exception
-
-
-
-
-
newInitialMessage
Returns a new message that is sent at first time when the connection to the proxy server has been established.
- Returns:
- the initial message, or
null if the proxy server is expected to send the first message instead
- Throws:
Exception
-
sendToProxyServer
protected final void sendToProxyServer(Object msg)
-
-
-
-
handleResponse
Handles the message received from the proxy server.
- Returns:
true if the connection to the destination has been established,
false if the connection to the destination has not been established and more messages are
expected from the proxy server
- Throws:
Exception
-
exceptionMessage
Decorates the specified exception message with the common information such as the current protocol,
authentication scheme, proxy address, and destination address.
-
-
-
|