| 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 Promise | |
| 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 FutureListener |
| 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 default io. Channel of the ChannelHandlerContext is now active
|
| public final void | channelExceptionCaught(ChannelHandlerContext ctx, Throwable cause)
Overrides default io. Throwable was thrown when handling inbound events.
|
| public final void | channelInactive(ChannelHandlerContext ctx)
Overrides default io. Channel of the ChannelHandlerContext was registered is now inactive and reached its
end of lifetime.
|
| public final void | channelRead(ChannelHandlerContext ctx, Object msg)
Overrides default io. Channel has read a message from the peer.
|
| public final void | channelReadComplete(ChannelHandlerContext ctx)
Overrides default io. channelRead(ChannelHandlerContext, Object).
|
| public final Future | connect(ChannelHandlerContext
the ctx, SocketAddress ChannelHandlerContext for which the connect operation is madethe remoteAddress, SocketAddress SocketAddress to which it should connectthe localAddress)SocketAddress which is used as source on connectOverrides default io. |
| public final Future | connectFuture()
Returns a |
| public final long | |
| public final <T extends SocketAddress> T | |
| 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 default io. |
| public final void | handlerAdded(ChannelHandlerContext ctx)
Overrides default 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 Future | write(ChannelHandlerContext
the ctx, Object ChannelHandlerContext for which the write operation is madethe message to write msg)Overrides default io. |
| 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 Promise<Channel> connectPromise | |
| 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 FutureListener<Void> 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, Promise<Void> 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 default io. Doc from io. The
| |
| channelExceptionCaught | back to summary |
|---|---|
| public final void channelExceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception Overrides default io. Doc from io. Gets called if a
| |
| channelInactive | back to summary |
|---|---|
| public final void channelInactive(ChannelHandlerContext ctx) throws Exception Overrides default io. Doc from io. The
| |
| channelRead | back to summary |
|---|---|
| public final void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception Overrides default io. Doc from io. Invoked when the current
| |
| channelReadComplete | back to summary |
|---|---|
| public final void channelReadComplete(ChannelHandlerContext ctx) throws Exception Overrides default io. Doc from io. Invoked when the last message read by the current read operation has been consumed by
| |
| connect | back to summary |
|---|---|
| public final Future Overrides default io. Doc from io. Called once a connect operation is made.
| |
| 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.
| |
| 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) Overrides default io. Doc from io. Called once a flush operation is made. The flush operation will try to flush out all previous written messages that are pending.
| |
| handlerAdded | back to summary |
|---|---|
| public final void handlerAdded(ChannelHandlerContext ctx) throws Exception Overrides default 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(ChannelHandlerContext ctx) | |
| 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 Future Overrides default io. Doc from io. Called once a write operation is made. The write operation will write the messages through the
| |
| writePendingWrites | back to summary |
|---|---|
| private void writePendingWrites(ChannelHandlerContext ctx) | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected void |
| LazyPromise | back to summary |
|---|---|
| pack-priv LazyPromise() | |
| checkDeadLock | back to summary |
|---|---|
| protected void checkDeadLock() Overrides io.
| |