| Modifier and Type | Class and Description |
|---|---|
| public static interface | HttpClientUpgradeHandler.
The source codec that is used in the pipeline initially. |
| public static interface | HttpClientUpgradeHandler.
A codec that the source can be upgraded to. |
| public static enum | HttpClientUpgradeHandler.
User events that are fired to notify about upgrade status. |
| Modifier and Type | Field and Description |
|---|---|
| private final HttpClientUpgradeHandler. | |
| private final HttpClientUpgradeHandler. | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public | HttpClientUpgradeHandler(HttpClientUpgradeHandler.
the codec that is being used initially. sourceCodec,the codec that the client would like to upgrade to. upgradeCodec,the maximum length of the aggregated content. maxContentLength)Constructs the client upgrade handler. |
| 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 | 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. |
| protected void | decode(ChannelHandlerContext
the ctx, HttpObject ChannelHandlerContext which this MessageToMessageDecoder belongs tothe message to decode to an other one msg, List<Object> the out)
Decode from one message to an other.
List to which decoded messages should be added |
| 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 | flush(ChannelHandlerContext
the ctx)ChannelHandlerContext for which the flush operation is madeImplements io. |
| public void | read(ChannelHandlerContext ctx)
Implements io. ChannelHandlerContext#read().
|
| private static void | |
| private void | setUpgradeRequestHeaders(ChannelHandlerContext ctx, HttpRequest request)
Adds all upgrade request headers necessary for an upgrade to the supported protocols. |
| 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. |
| sourceCodec | back to summary |
|---|---|
| private final HttpClientUpgradeHandler. | |
| upgradeCodec | back to summary |
|---|---|
| private final HttpClientUpgradeHandler. | |
| upgradeRequested | back to summary |
|---|---|
| private boolean upgradeRequested | |
| HttpClientUpgradeHandler | back to summary |
|---|---|
| public HttpClientUpgradeHandler(HttpClientUpgradeHandler. Constructs the client upgrade handler.
| |
| 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.
| |
| 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.
| |
| decode | back to summary |
|---|---|
| protected void decode(ChannelHandlerContext ctx, HttpObject msg, List<Object> out) throws Exception Overrides io. Doc from io. Decode from one message to an other. This method will be called for each written message that can be handled by this decoder.
| |
| 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.
| |
| 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.
| |
| read | back to summary |
|---|---|
| public void read(ChannelHandlerContext ctx) throws Exception Implements io. Doc from io. Intercepts
| |
| removeThisHandler | back to summary |
|---|---|
| private static void removeThisHandler(ChannelHandlerContext ctx) | |
| setUpgradeRequestHeaders | back to summary |
|---|---|
| private void setUpgradeRequestHeaders(ChannelHandlerContext ctx, HttpRequest request) Adds all upgrade request headers necessary for an upgrade to the supported protocols. | |
| 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 | Method and Description |
|---|---|
| public void | prepareUpgradeFrom(ChannelHandlerContext ctx)
Removes or disables the encoder of this codec so that the |
| public void | upgradeFrom(ChannelHandlerContext ctx)
Removes this codec (i.e. all associated handlers) from the pipeline. |
| prepareUpgradeFrom | back to summary |
|---|---|
| public void prepareUpgradeFrom(ChannelHandlerContext ctx) Removes or disables the encoder of this codec so that the | |
| upgradeFrom | back to summary |
|---|---|
| public void upgradeFrom(ChannelHandlerContext ctx) Removes this codec (i.e. all associated handlers) from the pipeline. | |
| Modifier and Type | Method and Description |
|---|---|
| public CharSequence | protocol()
Returns the name of the protocol supported by this codec, as indicated by the |
| public Collection | setUpgradeHeaders(ChannelHandlerContext ctx, HttpRequest upgradeRequest)
Sets any protocol-specific headers required to the upgrade request. |
| public void | upgradeTo(ChannelHandlerContext
the context for the current handler. ctx, FullHttpResponse the 101 Switching Protocols response that indicates that the server
has switched to this protocol. upgradeResponse)Performs an HTTP protocol upgrade from the source codec. |
| protocol | back to summary |
|---|---|
| public CharSequence protocol() Returns the name of the protocol supported by this codec, as indicated by the | |
| setUpgradeHeaders | back to summary |
|---|---|
| public Collection Sets any protocol-specific headers required to the upgrade request. Returns the names of all headers that were added. These headers will be used to populate the CONNECTION header. | |
| upgradeTo | back to summary |
|---|---|
| public void upgradeTo(ChannelHandlerContext ctx, FullHttpResponse upgradeResponse) throws Exception Performs an HTTP protocol upgrade from the source codec. This method is responsible for adding all handlers required for the new protocol.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final HttpClientUpgradeHandler. | UPGRADE_ISSUED
The Upgrade request was sent to the server. |
| public static final HttpClientUpgradeHandler. | UPGRADE_REJECTED
The Upgrade was unsuccessful due to the server not issuing with a 101 Switching Protocols response. |
| public static final HttpClientUpgradeHandler. | UPGRADE_SUCCESSFUL
The Upgrade to the new protocol was successful. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static HttpClientUpgradeHandler. | |
| public static HttpClientUpgradeHandler. |
| UPGRADE_ISSUED | back to summary |
|---|---|
| public static final HttpClientUpgradeHandler. The Upgrade request was sent to the server. | |
| UPGRADE_REJECTED | back to summary |
|---|---|
| public static final HttpClientUpgradeHandler. The Upgrade was unsuccessful due to the server not issuing with a 101 Switching Protocols response. | |
| UPGRADE_SUCCESSFUL | back to summary |
|---|---|
| public static final HttpClientUpgradeHandler. The Upgrade to the new protocol was successful. | |
| UpgradeEvent | back to summary |
|---|---|
| private UpgradeEvent() | |
| valueOf | back to summary |
|---|---|
| public static HttpClientUpgradeHandler. | |
| values | back to summary |
|---|---|
| public static HttpClientUpgradeHandler. | |