| Modifier and Type | Class and Description |
|---|---|
| private class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final String | AUTH_NONE
A string that signifies 'no authentication' or 'anonymous'. |
| private final ProxyHandler. | |
| private Future | |
| private volatile long | |
| private volatile ChannelHandlerContext | |
| private static final long | DEFAULT_CONNECT_TIMEOUT_MILLIS
The default connect timeout: 10 seconds. |
| private volatile SocketAddress | |
| private boolean | |
| private boolean | |
| private static final InternalLogger | |
| private PendingWriteQueue | |
| private final SocketAddress | |
| private boolean | |
| private final ChannelFutureListener |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected abstract void | addCodec(ChannelHandlerContext ctx)
Adds the codec handlers required to communicate with the proxy server. |
| private void | |
| public abstract String | |
| private void | |
| public final void | channelActive(ChannelHandlerContext ctx)
Overrides io. Implements io. ChannelHandlerContext#fireChannelActive() to forward
to the next ChannelInboundHandler in the ChannelPipeline.
|
| public final void | channelInactive(ChannelHandlerContext ctx)
Overrides io. Implements io. ChannelHandlerContext#fireChannelInactive() to forward
to the next ChannelInboundHandler in the ChannelPipeline.
|
| public final void | channelRead(ChannelHandlerContext ctx, Object msg)
Overrides io. Implements io. ChannelHandlerContext#fireChannelRead(Object) to forward
to the next ChannelInboundHandler in the ChannelPipeline.
|
| public final void | channelReadComplete(ChannelHandlerContext ctx)
Overrides io. Implements io. ChannelHandlerContext#fireChannelReadComplete() to forward
to the next ChannelInboundHandler in the ChannelPipeline.
|
| public final void | connect(ChannelHandlerContext
the ctx, SocketAddress ChannelHandlerContext for which the connect operation is madethe remoteAddress, SocketAddress SocketAddress to which it should connectthe localAddress, ChannelPromise SocketAddress which is used as source on connectthe promise)ChannelPromise to notify once the operation completesOverrides io. Implements io. ChannelHandlerContext#connect(SocketAddress, SocketAddress, ChannelPromise) to forward
to the next ChannelOutboundHandler in the ChannelPipeline.
|
| public final Future | connectFuture()
Returns a |
| public final long | |
| public final <T extends SocketAddress> T | |
| public final void | exceptionCaught(ChannelHandlerContext ctx, Throwable cause)
Overrides io. Implements io. Throwable was thrown.
|
| protected final String | exceptionMessage(String msg)
Decorates the specified exception message with the common information such as the current protocol, authentication scheme, proxy address, and destination address. |
| private void | |
| private void | |
| public final void | flush(ChannelHandlerContext
the ctx)ChannelHandlerContext for which the flush operation is madeOverrides io. Implements io. ChannelHandlerContext#flush() to forward
to the next ChannelOutboundHandler in the ChannelPipeline.
|
| public final void | handlerAdded(ChannelHandlerContext ctx)
Overrides io. Implements io. ChannelHandler was added to the actual context and it's ready to handle events.
|
| protected abstract boolean | 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 serverHandles the message received from the proxy server. |
| public final boolean | isConnected()
Returns |
| protected abstract Object | Returns: the initial message, ornull if the proxy server is expected to send the first message insteadReturns a new message that is sent at first time when the connection to the proxy server has been established. |
| public abstract String | |
| public final <T extends SocketAddress> T | |
| private static void | |
| protected abstract void | removeDecoder(ChannelHandlerContext ctx)
Removes the decoders added in |
| protected abstract void | removeEncoder(ChannelHandlerContext ctx)
Removes the encoders added in |
| private boolean | |
| private boolean | |
| private void | sendInitialMessage(final ChannelHandlerContext ctx)
Sends the initial message to be sent to the proxy server. |
| protected final void | |
| private void | |
| private void | |
| public final void | |
| public final void | write(ChannelHandlerContext
the ctx, Object ChannelHandlerContext for which the write operation is madethe message to write msg, ChannelPromise the promise)ChannelPromise to notify once the operation completesOverrides io. Implements io. ChannelHandlerContext#write(Object, ChannelPromise) to forward
to the next ChannelOutboundHandler in the ChannelPipeline.
|
| private void |
| AUTH_NONE | back to summary |
|---|---|
| pack-priv static final String AUTH_NONE A string that signifies 'no authentication' or 'anonymous'. | |
| connectPromise | back to summary |
|---|---|
| private final ProxyHandler. | |
| connectTimeoutFuture | back to summary |
|---|---|
| private Future<?> connectTimeoutFuture | |
| connectTimeoutMillis | back to summary |
|---|---|
| private volatile long connectTimeoutMillis | |
| ctx | back to summary |
|---|---|
| private volatile ChannelHandlerContext ctx | |
| DEFAULT_CONNECT_TIMEOUT_MILLIS | back to summary |
|---|---|
| private static final long DEFAULT_CONNECT_TIMEOUT_MILLIS The default connect timeout: 10 seconds. | |
| destinationAddress | back to summary |
|---|---|
| private volatile SocketAddress destinationAddress | |
| finished | back to summary |
|---|---|
| private boolean finished | |
| flushedPrematurely | back to summary |
|---|---|
| private boolean flushedPrematurely | |
| logger | back to summary |
|---|---|
| private static final InternalLogger logger | |
| pendingWrites | back to summary |
|---|---|
| private PendingWriteQueue pendingWrites | |
| proxyAddress | back to summary |
|---|---|
| private final SocketAddress proxyAddress | |
| suppressChannelReadComplete | back to summary |
|---|---|
| private boolean suppressChannelReadComplete | |
| writeListener | back to summary |
|---|---|
| private final ChannelFutureListener writeListener | |
| ProxyHandler | back to summary |
|---|---|
| protected ProxyHandler(SocketAddress proxyAddress) | |
| addCodec | back to summary |
|---|---|
| protected abstract void addCodec(ChannelHandlerContext ctx) throws Exception Adds the codec handlers required to communicate with the proxy server. | |
| addPendingWrite | back to summary |
|---|---|
| private void addPendingWrite(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) | |
| authScheme | back to summary |
|---|---|
| public abstract String authScheme() Returns the name of the authentication scheme in use. | |
| cancelConnectTimeoutFuture | back to summary |
|---|---|
| private void cancelConnectTimeoutFuture() | |
| channelActive | back to summary |
|---|---|
| public final void channelActive(ChannelHandlerContext ctx) throws Exception Overrides io. Implements io. Doc from io. Calls
| |
| channelInactive | back to summary |
|---|---|
| public final void channelInactive(ChannelHandlerContext ctx) throws Exception Overrides io. Implements io. Doc from io. Calls
| |
| channelRead | back to summary |
|---|---|
| public final void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception Overrides io. Implements io. Doc from io. Calls
| |
| channelReadComplete | back to summary |
|---|---|
| public final void channelReadComplete(ChannelHandlerContext ctx) throws Exception Overrides io. Implements io. Doc from io. Calls
| |
| connectFuture | back to summary |
|---|---|
| public final Future Returns a | |
| connectTimeoutMillis | back to summary |
|---|---|
| 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. | |
| destinationAddress | back to summary |
|---|---|
| public final <T extends SocketAddress> T destinationAddress() Returns the address of the destination to connect to via the proxy server.
| |
| exceptionCaught | back to summary |
|---|---|
| public final void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception Overrides io. Implements io. Doc from io. Gets called if a
| |
| exceptionMessage | back to summary |
|---|---|
| protected final String exceptionMessage(String msg) Decorates the specified exception message with the common information such as the current protocol, authentication scheme, proxy address, and destination address. | |
| failPendingWrites | back to summary |
|---|---|
| private void failPendingWrites(Throwable cause) | |
| failPendingWritesAndClose | back to summary |
|---|---|
| private void failPendingWritesAndClose(Throwable cause) | |
| flush | back to summary |
|---|---|
| public final void flush(ChannelHandlerContext ctx) throws Exception Overrides io. Implements io. Doc from io. Calls
| |
| handlerAdded | back to summary |
|---|---|
| public final void handlerAdded(ChannelHandlerContext ctx) throws Exception Overrides io. Implements io. Doc from io. Gets called after the
| |
| handleResponse | back to summary |
|---|---|
| protected abstract boolean handleResponse(ChannelHandlerContext ctx, Object response) throws Exception Handles the message received from the proxy server.
| |
| isConnected | back to summary |
|---|---|
| public final boolean isConnected() Returns | |
| newInitialMessage | back to summary |
|---|---|
| protected abstract Object newInitialMessage(ChannelHandlerContext ctx) throws Exception Returns a new message that is sent at first time when the connection to the proxy server has been established.
| |
| protocol | back to summary |
|---|---|
| public abstract String protocol() Returns the name of the proxy protocol in use. | |
| proxyAddress | back to summary |
|---|---|
| public final <T extends SocketAddress> T proxyAddress() Returns the address of the proxy server.
| |
| readIfNeeded | back to summary |
|---|---|
| private static void readIfNeeded(ChannelHandlerContext ctx) | |
| removeDecoder | back to summary |
|---|---|
| protected abstract void removeDecoder(ChannelHandlerContext ctx) throws Exception Removes the decoders added in | |
| removeEncoder | back to summary |
|---|---|
| protected abstract void removeEncoder(ChannelHandlerContext ctx) throws Exception Removes the encoders added in | |
| safeRemoveDecoder | back to summary |
|---|---|
| private boolean safeRemoveDecoder() | |
| safeRemoveEncoder | back to summary |
|---|---|
| private boolean safeRemoveEncoder() | |
| sendInitialMessage | back to summary |
|---|---|
| private void sendInitialMessage(final ChannelHandlerContext ctx) throws Exception Sends the initial message to be sent to the proxy server. This method also starts a timeout task which marks
the | |
| sendToProxyServer | back to summary |
|---|---|
| protected final void sendToProxyServer(Object msg) Sends the specified message to the proxy server. Use this method to send a response to the proxy server in
| |
| setConnectFailure | back to summary |
|---|---|
| private void setConnectFailure(Throwable cause) | |
| setConnectSuccess | back to summary |
|---|---|
| private void setConnectSuccess() | |
| setConnectTimeoutMillis | back to summary |
|---|---|
| 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. | |
| write | back to summary |
|---|---|
| public final void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception Overrides io. Implements io. Doc from io. Calls
| |
| writePendingWrites | back to summary |
|---|---|
| private void writePendingWrites() | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| protected EventExecutor | executor()
Get the executor used to notify listeners when this promise is complete.
|
| LazyChannelPromise | back to summary |
|---|---|
| private LazyChannelPromise() | |
| executor | back to summary |
|---|---|
| protected EventExecutor executor() Overrides io. Doc from io. Get the executor used to notify listeners when this promise is complete.
It is assumed this executor will protect against
| |