Class WebSocketServerProtocolConfig.Builder
java.lang.Object
io.netty.handler.codec.http.websocketx.WebSocketServerProtocolConfig.Builder
- Enclosing class:
WebSocketServerProtocolConfig
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate WebSocketDecoderConfigprivate WebSocketDecoderConfig.Builderprivate booleanprivate longprivate booleanprivate longprivate WebSocketCloseStatusprivate Stringprivate String -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateBuilder(WebSocketServerProtocolConfig serverConfig) privateBuilder(String websocketPath, String subprotocols, boolean checkStartsWith, long handshakeTimeoutMillis, long forceCloseTimeoutMillis, boolean handleCloseFrames, WebSocketCloseStatus sendCloseFrame, boolean dropPongFrames, WebSocketDecoderConfig decoderConfig) -
Method Summary
Modifier and TypeMethodDescriptionallowExtensions(boolean allowExtensions) allowMaskMismatch(boolean allowMaskMismatch) build()Build unmodifiable server protocol configuration.checkStartsWith(boolean checkStartsWith) trueto handle all requests, where URI path component starts fromWebSocketServerProtocolConfig.websocketPath(),falsefor exact match (default).closeOnProtocolViolation(boolean closeOnProtocolViolation) decoderConfig(WebSocketDecoderConfig decoderConfig) Frames decoder configuration.private WebSocketDecoderConfig.BuilderdropPongFrames(boolean dropPongFrames) trueif pong frames should not be forwardedexpectMaskedFrames(boolean expectMaskedFrames) forceCloseTimeoutMillis(long forceCloseTimeoutMillis) Close the connection if it was not closed by the client after timeout specifiedhandleCloseFrames(boolean handleCloseFrames) trueif close frames should not be forwarded and just close the channelhandshakeTimeoutMillis(long handshakeTimeoutMillis) Handshake timeout in mills, when handshake timeout, will trigger user eventWebSocketClientProtocolHandler.ClientHandshakeStateEvent.HANDSHAKE_TIMEOUTmaxFramePayloadLength(int maxFramePayloadLength) sendCloseFrame(WebSocketCloseStatus sendCloseFrame) Close frame to send, when close frame was not send manually.subprotocols(String subprotocols) CSV of supported protocolswebsocketPath(String websocketPath) URI path component to handle websocket upgrade requests on.withUTF8Validator(boolean withUTF8Validator)
-
Field Details
-
websocketPath
-
subprotocols
-
checkStartsWith
private boolean checkStartsWith -
handshakeTimeoutMillis
private long handshakeTimeoutMillis -
forceCloseTimeoutMillis
private long forceCloseTimeoutMillis -
handleCloseFrames
private boolean handleCloseFrames -
sendCloseFrame
-
dropPongFrames
private boolean dropPongFrames -
decoderConfig
-
decoderConfigBuilder
-
-
Constructor Details
-
Builder
-
Builder
private Builder(String websocketPath, String subprotocols, boolean checkStartsWith, long handshakeTimeoutMillis, long forceCloseTimeoutMillis, boolean handleCloseFrames, WebSocketCloseStatus sendCloseFrame, boolean dropPongFrames, WebSocketDecoderConfig decoderConfig)
-
-
Method Details
-
websocketPath
URI path component to handle websocket upgrade requests on. -
subprotocols
CSV of supported protocols -
checkStartsWith
trueto handle all requests, where URI path component starts fromWebSocketServerProtocolConfig.websocketPath(),falsefor exact match (default). -
handshakeTimeoutMillis
Handshake timeout in mills, when handshake timeout, will trigger user eventWebSocketClientProtocolHandler.ClientHandshakeStateEvent.HANDSHAKE_TIMEOUT -
forceCloseTimeoutMillis
Close the connection if it was not closed by the client after timeout specified -
handleCloseFrames
trueif close frames should not be forwarded and just close the channel -
sendCloseFrame
Close frame to send, when close frame was not send manually. Ornullto disable proper close. -
dropPongFrames
trueif pong frames should not be forwarded -
decoderConfig
Frames decoder configuration. -
decoderConfigBuilder
-
maxFramePayloadLength
-
expectMaskedFrames
-
allowMaskMismatch
-
allowExtensions
-
closeOnProtocolViolation
public WebSocketServerProtocolConfig.Builder closeOnProtocolViolation(boolean closeOnProtocolViolation) -
withUTF8Validator
-
build
Build unmodifiable server protocol configuration.
-