HTTP users who need to connect to a message-forwarding HTTP proxy agent instead of a tunneling proxy should not use this handler.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| public static class | HttpProxyHandler.
Specific case of a connection failure, which may include headers from the proxy. |
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private final CharSequence | |
| private final HttpProxyHandler. | |
| private final boolean | |
| private HttpHeaders | |
| private final HttpHeaders | |
| private final String | |
| private static final String | |
| private HttpResponseStatus | |
| private final String |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | HttpProxyHandler(SocketAddress proxyAddress, HttpHeaders headers, boolean ignoreDefaultPortsInConnectHostHeader)
|
| public | |
| public | |
| public | HttpProxyHandler(SocketAddress proxyAddress, String username, String password, HttpHeaders headers, boolean ignoreDefaultPortsInConnectHostHeader)
|
| Modifier and Type | Method and Description |
|---|---|
| protected void | addCodec(ChannelHandlerContext ctx)
Implements abstract io. |
| public String | authScheme()
Implements abstract io. |
| protected boolean | handleResponse(ChannelHandlerContext ctx, Object response)
Implements abstract io. |
| protected Object | newInitialMessage(ChannelHandlerContext ctx)
Implements abstract io. |
| public String | |
| public String | protocol()
Implements abstract io. |
| protected void | removeDecoder(ChannelHandlerContext ctx)
Implements abstract io. addCodec(ChannelHandlerContext).
|
| protected void | removeEncoder(ChannelHandlerContext ctx)
Implements abstract io. addCodec(ChannelHandlerContext).
|
| public String |
| AUTH_BASIC | back to summary |
|---|---|
| private static final String AUTH_BASIC | |
| authorization | back to summary |
|---|---|
| private final CharSequence authorization | |
| codecWrapper | back to summary |
|---|---|
| private final HttpProxyHandler. | |
| ignoreDefaultPortsInConnectHostHeader | back to summary |
|---|---|
| private final boolean ignoreDefaultPortsInConnectHostHeader | |
| inboundHeaders | back to summary |
|---|---|
| private HttpHeaders inboundHeaders | |
| outboundHeaders | back to summary |
|---|---|
| private final HttpHeaders outboundHeaders | |
| password | back to summary |
|---|---|
| private final String password | |
| PROTOCOL | back to summary |
|---|---|
| private static final String PROTOCOL | |
| status | back to summary |
|---|---|
| private HttpResponseStatus status | |
| username | back to summary |
|---|---|
| private final String username | |
| HttpProxyHandler | back to summary |
|---|---|
| public HttpProxyHandler(SocketAddress proxyAddress) | |
| HttpProxyHandler | back to summary |
|---|---|
| public HttpProxyHandler(SocketAddress proxyAddress, HttpHeaders headers) | |
| HttpProxyHandler | back to summary |
|---|---|
| public HttpProxyHandler(SocketAddress proxyAddress, HttpHeaders headers, boolean ignoreDefaultPortsInConnectHostHeader) | |
| HttpProxyHandler | back to summary |
|---|---|
| public HttpProxyHandler(SocketAddress proxyAddress, String username, String password) | |
| HttpProxyHandler | back to summary |
|---|---|
| public HttpProxyHandler(SocketAddress proxyAddress, String username, String password, HttpHeaders headers) | |
| HttpProxyHandler | back to summary |
|---|---|
| public HttpProxyHandler(SocketAddress proxyAddress, String username, String password, HttpHeaders headers, boolean ignoreDefaultPortsInConnectHostHeader) | |
| addCodec | back to summary |
|---|---|
| protected void addCodec(ChannelHandlerContext ctx) throws Exception Implements abstract io. Doc from io. Adds the codec handlers required to communicate with the proxy server.
| |
| authScheme | back to summary |
|---|---|
| public String authScheme() Implements abstract io. Doc from io. Returns the name of the authentication scheme in use.
| |
| handleResponse | back to summary |
|---|---|
| protected boolean handleResponse(ChannelHandlerContext ctx, Object response) throws Exception Implements abstract io. Doc from io. Handles the message received from the proxy server.
| |
| newInitialMessage | back to summary |
|---|---|
| protected Object newInitialMessage(ChannelHandlerContext ctx) throws Exception Implements abstract io. Doc from io. Returns a new message that is sent at first time when the connection to the proxy server has been established. | |
| password | back to summary |
|---|---|
| public String password() | |
| protocol | back to summary |
|---|---|
| public String protocol() Implements abstract io. Doc from io. Returns the name of the proxy protocol in use.
| |
| removeDecoder | back to summary |
|---|---|
| protected void removeDecoder(ChannelHandlerContext ctx) throws Exception Implements abstract io. Doc from io. Removes the decoders added in
| |
| removeEncoder | back to summary |
|---|---|
| protected void removeEncoder(ChannelHandlerContext ctx) throws Exception Implements abstract io. Doc from io. Removes the encoders added in
| |
| username | back to summary |
|---|---|
| public String username() | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final HttpClientCodec |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | bind(ChannelHandlerContext
the ctx, SocketAddress ChannelHandlerContext for which the bind operation is madethe localAddress, ChannelPromise SocketAddress to which it should boundthe promise)ChannelPromise to notify once the operation completesImplements io. |
| public void | channelActive(ChannelHandlerContext ctx)
Implements io. Channel of the ChannelHandlerContext is now active
|
| public void | channelInactive(ChannelHandlerContext ctx)
Implements io. Channel of the ChannelHandlerContext was registered is now inactive and reached its
end of lifetime.
|
| public void | channelRead(ChannelHandlerContext ctx, Object msg)
Implements io. Channel has read a message from the peer.
|
| public void | channelReadComplete(ChannelHandlerContext ctx)
Implements io. channelRead(ChannelHandlerContext, Object).
|
| public void | channelRegistered(ChannelHandlerContext ctx)
Implements io. Channel of the ChannelHandlerContext was registered with its EventLoop
|
| public void | channelUnregistered(ChannelHandlerContext ctx)
Implements io. Channel of the ChannelHandlerContext was unregistered from its EventLoop
|
| public void | channelWritabilityChanged(ChannelHandlerContext ctx)
Implements io. Channel changed.
|
| public void | close(ChannelHandlerContext
the ctx, ChannelPromise ChannelHandlerContext for which the close operation is madethe promise)ChannelPromise to notify once the operation completesImplements io. |
| public 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 completesImplements io. |
| public void | deregister(ChannelHandlerContext
the ctx, ChannelPromise ChannelHandlerContext for which the close operation is madethe promise)ChannelPromise to notify once the operation completesImplements io. EventLoop.
|
| public void | disconnect(ChannelHandlerContext
the ctx, ChannelPromise ChannelHandlerContext for which the disconnect operation is madethe promise)ChannelPromise to notify once the operation completesImplements io. |
| public void | exceptionCaught(ChannelHandlerContext ctx, Throwable cause)
Implements io. Throwable was thrown.
|
| public void | flush(ChannelHandlerContext
the ctx)ChannelHandlerContext for which the flush operation is madeImplements io. |
| public void | handlerAdded(ChannelHandlerContext ctx)
Implements io. ChannelHandler was added to the actual context and it's ready to handle events.
|
| public void | handlerRemoved(ChannelHandlerContext ctx)
Implements io. ChannelHandler was removed from the actual context and it doesn't handle events
anymore.
|
| public void | read(ChannelHandlerContext ctx)
Implements io. ChannelHandlerContext#read().
|
| public void | userEventTriggered(ChannelHandlerContext ctx, Object evt)
Implements io. |
| public 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 completesImplements io. |
| codec | back to summary |
|---|---|
| pack-priv final HttpClientCodec codec | |
| HttpClientCodecWrapper | back to summary |
|---|---|
| private HttpClientCodecWrapper() | |
| bind | back to summary |
|---|---|
| public void bind(ChannelHandlerContext ctx, SocketAddress localAddress, ChannelPromise promise) throws Exception Implements io. Doc from io. Called once a bind operation is made.
| |
| channelActive | back to summary |
|---|---|
| public void channelActive(ChannelHandlerContext ctx) throws Exception Implements io. Doc from io. The
| |
| channelInactive | back to summary |
|---|---|
| public void channelInactive(ChannelHandlerContext ctx) throws Exception Implements io. Doc from io. The
| |
| channelRead | back to summary |
|---|---|
| public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception Implements io. Doc from io. Invoked when the current
| |
| channelReadComplete | back to summary |
|---|---|
| public void channelReadComplete(ChannelHandlerContext ctx) throws Exception Implements io. Doc from io. Invoked when the last message read by the current read operation has been consumed by
| |
| channelRegistered | back to summary |
|---|---|
| public void channelRegistered(ChannelHandlerContext ctx) throws Exception Implements io. Doc from io. The
| |
| channelUnregistered | back to summary |
|---|---|
| public void channelUnregistered(ChannelHandlerContext ctx) throws Exception Implements io. Doc from io. The
| |
| channelWritabilityChanged | back to summary |
|---|---|
| public void channelWritabilityChanged(ChannelHandlerContext ctx) throws Exception Implements io. Doc from io. Gets called once the writable state of a
| |
| close | back to summary |
|---|---|
| public void close(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception Implements io. Doc from io. Called once a close operation is made.
| |
| connect | back to summary |
|---|---|
| public void connect(ChannelHandlerContext ctx, SocketAddress remoteAddress, SocketAddress localAddress, ChannelPromise promise) throws Exception Implements io. Doc from io. Called once a connect operation is made.
| |
| deregister | back to summary |
|---|---|
| public void deregister(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception Implements io. Doc from io. Called once a deregister operation is made from the current registered
| |
| disconnect | back to summary |
|---|---|
| public void disconnect(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception Implements io. Doc from io. Called once a disconnect operation is made.
| |
| exceptionCaught | back to summary |
|---|---|
| public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception Implements io. Doc from io. Gets called if a
| |
| flush | back to summary |
|---|---|
| public void flush(ChannelHandlerContext ctx) throws Exception Implements 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 void handlerAdded(ChannelHandlerContext ctx) throws Exception Implements io. Doc from io. Gets called after the
| |
| handlerRemoved | back to summary |
|---|---|
| public void handlerRemoved(ChannelHandlerContext ctx) throws Exception Implements io. Doc from io. Gets called after the
| |
| read | back to summary |
|---|---|
| public void read(ChannelHandlerContext ctx) throws Exception Implements io. Doc from io. Intercepts
| |
| userEventTriggered | back to summary |
|---|---|
| public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception Implements io. Doc from io. Gets called if an user event was triggered.
| |
| write | back to summary |
|---|---|
| public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception Implements io. Doc from io. Called once a write operation is made. The write operation will write the messages through the
| |
| Modifier and Type | Field and Description |
|---|---|
| private final HttpHeaders | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | HttpProxyConnectException(String
The failure message. message, HttpHeaders Header associated with the connection failure. May be headers)null.
|
| Modifier and Type | Method and Description |
|---|---|
| public HttpHeaders |
| headers | back to summary |
|---|---|
| private final HttpHeaders headers | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides io. | |
| HttpProxyConnectException | back to summary |
|---|---|
public HttpProxyConnectException(String message, HttpHeaders headers)
| |
| headers | back to summary |
|---|---|
| public HttpHeaders headers() Returns headers, if any. May be | |