It negotiates the extensions based on the client desired order, ensures that the successfully negotiated extensions are consistent between them, and initializes the channel pipeline with the extension decoder and encoder.
Find a basic implementation for compression extensions at io.netty5.handler.codec.http.websocketx.extensions.compression.WebSocketServerCompressionHandler.
| Modifier and Type | Field and Description |
|---|---|
| private final List | |
| private List |
| Access | Constructor and Description |
|---|---|
| public | WebSocketServerExtensionHandler(WebSocketServerExtensionHandshaker...
The extension handshaker in priority order. A handshaker could be repeated many times
with fallback configuration. extensionHandshakers)Constructor |
| Modifier and Type | Method and Description |
|---|---|
| public void | channelRead(ChannelHandlerContext ctx, Object msg)
Overrides default io. Channel has read a message from the peer.
|
| public Future | write(final ChannelHandlerContext
the ctx, Object ChannelHandlerContext for which the write operation is madethe message to write msg)Overrides default io. |
| extensionHandshakers | back to summary |
|---|---|
| private final List<WebSocketServerExtensionHandshaker> extensionHandshakers | |
| validExtensions | back to summary |
|---|---|
| private List<WebSocketServerExtension> validExtensions | |
| WebSocketServerExtensionHandler | back to summary |
|---|---|
| public WebSocketServerExtensionHandler(WebSocketServerExtensionHandshaker... extensionHandshakers) Constructor
| |
| channelRead | back to summary |
|---|---|
| public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception Overrides default io. Doc from io. Invoked when the current
| |
| write | back to summary |
|---|---|
| public Future Overrides default io. Doc from io. Called once a write operation is made. The write operation will write the messages through the
| |