Class WebSocketClientProtocolConfig.Builder
- java.lang.Object
- 
- io.netty.handler.codec.http.websocketx.WebSocketClientProtocolConfig.Builder
 
- 
- Enclosing class:
- WebSocketClientProtocolConfig
 
 public static final class WebSocketClientProtocolConfig.Builder extends java.lang.Object
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description WebSocketClientProtocolConfig.BuilderabsoluteUpgradeUrl(boolean absoluteUpgradeUrl)Use an absolute url for the Upgrade request, typically when connecting through an HTTP proxy over clear HTTPWebSocketClientProtocolConfig.BuilderallowExtensions(boolean allowExtensions)Allow extensions to be used in the reserved bits of the web socket frameWebSocketClientProtocolConfig.BuilderallowMaskMismatch(boolean allowMaskMismatch)When set to true, frames which are not masked properly according to the standard will still be accepted.WebSocketClientProtocolConfigbuild()Build unmodifiable client protocol configuration.WebSocketClientProtocolConfig.BuildercustomHeaders(HttpHeaders customHeaders)Map of custom headers to add to the client requestWebSocketClientProtocolConfig.BuilderdropPongFrames(boolean dropPongFrames)trueif pong frames should not be forwardedWebSocketClientProtocolConfig.BuilderforceCloseTimeoutMillis(long forceCloseTimeoutMillis)Close the connection if it was not closed by the server after timeout specifiedWebSocketClientProtocolConfig.BuildergenerateOriginHeader(boolean generateOriginHeader)Allows to generate the `Origin`|`Sec-WebSocket-Origin` header value for handshake request according the given webSocketURI.WebSocketClientProtocolConfig.BuilderhandleCloseFrames(boolean handleCloseFrames)trueif close frames should not be forwarded and just close the channelWebSocketClientProtocolConfig.BuilderhandshakeTimeoutMillis(long handshakeTimeoutMillis)Handshake timeout in mills, when handshake timeout, will trigger user eventWebSocketClientProtocolHandler.ClientHandshakeStateEvent.HANDSHAKE_TIMEOUTWebSocketClientProtocolConfig.BuildermaxFramePayloadLength(int maxFramePayloadLength)Maximum length of a frame's payloadWebSocketClientProtocolConfig.BuilderperformMasking(boolean performMasking)Whether to mask all written websocket frames.WebSocketClientProtocolConfig.BuildersendCloseFrame(WebSocketCloseStatus sendCloseFrame)Close frame to send, when close frame was not send manually.WebSocketClientProtocolConfig.Buildersubprotocol(java.lang.String subprotocol)Sub protocol request sent to the server.WebSocketClientProtocolConfig.Builderversion(WebSocketVersion version)Version of web socket specification to use to connect to the serverWebSocketClientProtocolConfig.BuilderwebSocketUri(java.lang.String webSocketUri)URL for web socket communications. e.g "ws://myhost.com/mypath".WebSocketClientProtocolConfig.BuilderwebSocketUri(java.net.URI webSocketUri)URL for web socket communications. e.g "ws://myhost.com/mypath".WebSocketClientProtocolConfig.BuilderwithUTF8Validator(boolean withUTF8Validator)Toggles UTF8 validation for payload of text websocket frames.
 
- 
- 
- 
Method Detail- 
webSocketUripublic WebSocketClientProtocolConfig.Builder webSocketUri(java.lang.String webSocketUri) URL for web socket communications. e.g "ws://myhost.com/mypath". Subsequent web socket frames will be sent to this URL.
 - 
webSocketUripublic WebSocketClientProtocolConfig.Builder webSocketUri(java.net.URI webSocketUri) URL for web socket communications. e.g "ws://myhost.com/mypath". Subsequent web socket frames will be sent to this URL.
 - 
subprotocolpublic WebSocketClientProtocolConfig.Builder subprotocol(java.lang.String subprotocol) Sub protocol request sent to the server.
 - 
versionpublic WebSocketClientProtocolConfig.Builder version(WebSocketVersion version) Version of web socket specification to use to connect to the server
 - 
allowExtensionspublic WebSocketClientProtocolConfig.Builder allowExtensions(boolean allowExtensions) Allow extensions to be used in the reserved bits of the web socket frame
 - 
customHeaderspublic WebSocketClientProtocolConfig.Builder customHeaders(HttpHeaders customHeaders) Map of custom headers to add to the client request
 - 
maxFramePayloadLengthpublic WebSocketClientProtocolConfig.Builder maxFramePayloadLength(int maxFramePayloadLength) Maximum length of a frame's payload
 - 
performMaskingpublic WebSocketClientProtocolConfig.Builder performMasking(boolean performMasking) Whether to mask all written websocket frames. This must be set to true in order to be fully compatible with the websocket specifications. Client applications that communicate with a non-standard server which doesn't require masking might set this to false to achieve a higher performance.
 - 
allowMaskMismatchpublic WebSocketClientProtocolConfig.Builder allowMaskMismatch(boolean allowMaskMismatch) When set to true, frames which are not masked properly according to the standard will still be accepted.
 - 
handleCloseFramespublic WebSocketClientProtocolConfig.Builder handleCloseFrames(boolean handleCloseFrames) trueif close frames should not be forwarded and just close the channel
 - 
sendCloseFramepublic WebSocketClientProtocolConfig.Builder sendCloseFrame(WebSocketCloseStatus sendCloseFrame) Close frame to send, when close frame was not send manually. Ornullto disable proper close.
 - 
dropPongFramespublic WebSocketClientProtocolConfig.Builder dropPongFrames(boolean dropPongFrames) trueif pong frames should not be forwarded
 - 
handshakeTimeoutMillispublic WebSocketClientProtocolConfig.Builder handshakeTimeoutMillis(long handshakeTimeoutMillis) Handshake timeout in mills, when handshake timeout, will trigger user eventWebSocketClientProtocolHandler.ClientHandshakeStateEvent.HANDSHAKE_TIMEOUT
 - 
forceCloseTimeoutMillispublic WebSocketClientProtocolConfig.Builder forceCloseTimeoutMillis(long forceCloseTimeoutMillis) Close the connection if it was not closed by the server after timeout specified
 - 
absoluteUpgradeUrlpublic WebSocketClientProtocolConfig.Builder absoluteUpgradeUrl(boolean absoluteUpgradeUrl) Use an absolute url for the Upgrade request, typically when connecting through an HTTP proxy over clear HTTP
 - 
generateOriginHeaderpublic WebSocketClientProtocolConfig.Builder generateOriginHeader(boolean generateOriginHeader) Allows to generate the `Origin`|`Sec-WebSocket-Origin` header value for handshake request according the given webSocketURI. Usually it's not necessary and can be disabled, but for backward compatibility is set totrueas default.
 - 
withUTF8Validatorpublic WebSocketClientProtocolConfig.Builder withUTF8Validator(boolean withUTF8Validator) Toggles UTF8 validation for payload of text websocket frames. By default validation is enabled.
 - 
buildpublic WebSocketClientProtocolConfig build() Build unmodifiable client protocol configuration.
 
- 
 
-