GeezerVison is showing netty.io — HttpServerUpgradeHandler.UpgradeCodec (Netty API Reference (4.1.141.Final))
Interface HttpServerUpgradeHandler.UpgradeCodec
-
Method Summary
Modifier and Type
Method
Description
boolean
Prepares the upgradeHeaders for a protocol update based upon the contents of upgradeRequest.
Gets all protocol-specific headers required by this protocol for a successful upgrade.
void
Performs an HTTP protocol upgrade from the source codec.
-
Method Details
-
requiredUpgradeHeaders
Gets all protocol-specific headers required by this protocol for a successful upgrade.
Any supplied header will be required to appear in the
HttpHeaderNames.CONNECTION header as well.
-
prepareUpgradeResponse
Prepares the
upgradeHeaders for a protocol update based upon the contents of
upgradeRequest.
This method returns a boolean value to proceed or abort the upgrade in progress. If
false is
returned, the upgrade is aborted and the
upgradeRequest will be passed through the inbound pipeline
as if no upgrade was performed. If
true is returned, the upgrade will proceed to the next
step which invokes
upgradeTo(ChannelHandlerContext, FullHttpRequest). When returning
true, you can add headers to
the
upgradeHeaders so that they are added to the 101 Switching protocols response.
-
upgradeTo
Performs an HTTP protocol upgrade from the source codec. This method is responsible for
adding all handlers required for the new protocol.
- Parameters:
ctx - the context for the current handler.
upgradeRequest - the request that triggered the upgrade to this protocol.