Module io.netty5.codec.http
Class WebSocketServerProtocolConfig.Builder
- java.lang.Object
-
- io.netty5.handler.codec.http.websocketx.WebSocketServerProtocolConfig.Builder
-
- Enclosing class:
- WebSocketServerProtocolConfig
public static final class WebSocketServerProtocolConfig.Builder extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WebSocketServerProtocolConfig.BuilderallowExtensions(boolean allowExtensions)WebSocketServerProtocolConfig.BuilderallowMaskMismatch(boolean allowMaskMismatch)WebSocketServerProtocolConfigbuild()Build unmodifiable server protocol configuration.WebSocketServerProtocolConfig.BuildercheckStartsWith(boolean checkStartsWith)trueto handle all requests, where URI path component starts fromWebSocketServerProtocolConfig.websocketPath(),falsefor exact match (default).WebSocketServerProtocolConfig.BuildercloseOnProtocolViolation(boolean closeOnProtocolViolation)WebSocketServerProtocolConfig.BuilderdecoderConfig(WebSocketDecoderConfig decoderConfig)Frames decoder configuration.WebSocketServerProtocolConfig.BuilderdropPongFrames(boolean dropPongFrames)trueif pong frames should not be forwardedWebSocketServerProtocolConfig.BuilderexpectMaskedFrames(boolean expectMaskedFrames)WebSocketServerProtocolConfig.BuilderforceCloseTimeoutMillis(long forceCloseTimeoutMillis)Close the connection if it was not closed by the client after timeout specifiedWebSocketServerProtocolConfig.BuilderhandleCloseFrames(boolean handleCloseFrames)trueif close frames should not be forwarded and just close the channelWebSocketServerProtocolConfig.BuilderhandshakeTimeoutMillis(long handshakeTimeoutMillis)Handshake timeout in millis, when handshake timeout, will trigger an inbound channel eventWebSocketHandshakeCompletionEventwith aWebSocketHandshakeException.WebSocketServerProtocolConfig.BuildermaxFramePayloadLength(int maxFramePayloadLength)WebSocketServerProtocolConfig.BuildersendCloseFrame(WebSocketCloseStatus sendCloseFrame)Close frame to send, when close frame was not send manually.WebSocketServerProtocolConfig.Buildersubprotocols(String subprotocols)CSV of supported protocolsWebSocketServerProtocolConfig.BuilderwebsocketPath(String websocketPath)URI path component to handle websocket upgrade requests on.WebSocketServerProtocolConfig.BuilderwithUTF8Validator(boolean withUTF8Validator)
-
-
-
Method Detail
-
websocketPath
public WebSocketServerProtocolConfig.Builder websocketPath(String websocketPath)
URI path component to handle websocket upgrade requests on.
-
subprotocols
public WebSocketServerProtocolConfig.Builder subprotocols(String subprotocols)
CSV of supported protocols
-
checkStartsWith
public WebSocketServerProtocolConfig.Builder checkStartsWith(boolean checkStartsWith)
trueto handle all requests, where URI path component starts fromWebSocketServerProtocolConfig.websocketPath(),falsefor exact match (default).
-
handshakeTimeoutMillis
public WebSocketServerProtocolConfig.Builder handshakeTimeoutMillis(long handshakeTimeoutMillis)
Handshake timeout in millis, when handshake timeout, will trigger an inbound channel eventWebSocketHandshakeCompletionEventwith aWebSocketHandshakeException.
-
forceCloseTimeoutMillis
public WebSocketServerProtocolConfig.Builder forceCloseTimeoutMillis(long forceCloseTimeoutMillis)
Close the connection if it was not closed by the client after timeout specified
-
handleCloseFrames
public WebSocketServerProtocolConfig.Builder handleCloseFrames(boolean handleCloseFrames)
trueif close frames should not be forwarded and just close the channel
-
sendCloseFrame
public WebSocketServerProtocolConfig.Builder sendCloseFrame(WebSocketCloseStatus sendCloseFrame)
Close frame to send, when close frame was not send manually. Ornullto disable proper close.
-
dropPongFrames
public WebSocketServerProtocolConfig.Builder dropPongFrames(boolean dropPongFrames)
trueif pong frames should not be forwarded
-
decoderConfig
public WebSocketServerProtocolConfig.Builder decoderConfig(WebSocketDecoderConfig decoderConfig)
Frames decoder configuration.
-
maxFramePayloadLength
public WebSocketServerProtocolConfig.Builder maxFramePayloadLength(int maxFramePayloadLength)
-
expectMaskedFrames
public WebSocketServerProtocolConfig.Builder expectMaskedFrames(boolean expectMaskedFrames)
-
allowMaskMismatch
public WebSocketServerProtocolConfig.Builder allowMaskMismatch(boolean allowMaskMismatch)
-
allowExtensions
public WebSocketServerProtocolConfig.Builder allowExtensions(boolean allowExtensions)
-
closeOnProtocolViolation
public WebSocketServerProtocolConfig.Builder closeOnProtocolViolation(boolean closeOnProtocolViolation)
-
withUTF8Validator
public WebSocketServerProtocolConfig.Builder withUTF8Validator(boolean withUTF8Validator)
-
build
public WebSocketServerProtocolConfig build()
Build unmodifiable server protocol configuration.
-
-