Class WebSocketDecoderConfig
- java.lang.Object
-
- io.netty.handler.codec.http.websocketx.WebSocketDecoderConfig
-
public final class WebSocketDecoderConfig extends java.lang.Object
Frames decoder configuration.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WebSocketDecoderConfig.Builder
-
Field Summary
Fields Modifier and Type Field Description private boolean
allowExtensions
private boolean
allowMaskMismatch
private boolean
closeOnProtocolViolation
(package private) static WebSocketDecoderConfig
DEFAULT
private boolean
expectMaskedFrames
private int
maxFramePayloadLength
private boolean
withUTF8Validator
-
Constructor Summary
Constructors Modifier Constructor Description private
WebSocketDecoderConfig(int maxFramePayloadLength, boolean expectMaskedFrames, boolean allowMaskMismatch, boolean allowExtensions, boolean closeOnProtocolViolation, boolean withUTF8Validator)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allowExtensions()
boolean
allowMaskMismatch()
boolean
closeOnProtocolViolation()
boolean
expectMaskedFrames()
int
maxFramePayloadLength()
static WebSocketDecoderConfig.Builder
newBuilder()
WebSocketDecoderConfig.Builder
toBuilder()
java.lang.String
toString()
boolean
withUTF8Validator()
-
-
-
Field Detail
-
DEFAULT
static final WebSocketDecoderConfig DEFAULT
-
maxFramePayloadLength
private final int maxFramePayloadLength
-
expectMaskedFrames
private final boolean expectMaskedFrames
-
allowMaskMismatch
private final boolean allowMaskMismatch
-
allowExtensions
private final boolean allowExtensions
-
closeOnProtocolViolation
private final boolean closeOnProtocolViolation
-
withUTF8Validator
private final boolean withUTF8Validator
-
-
Constructor Detail
-
WebSocketDecoderConfig
private WebSocketDecoderConfig(int maxFramePayloadLength, boolean expectMaskedFrames, boolean allowMaskMismatch, boolean allowExtensions, boolean closeOnProtocolViolation, boolean withUTF8Validator)
Constructor- Parameters:
maxFramePayloadLength
- Maximum length of a frame's payload. Setting this to an appropriate value for you application helps check for denial of services attacks.expectMaskedFrames
- Web socket servers must set this to true processed incoming masked payload. Client implementations must set this to false.allowMaskMismatch
- Allows to loosen the masking requirement on received frames. When this is set to false then also frames which are not masked properly according to the standard will still be accepted.allowExtensions
- Flag to allow reserved extension bits to be used or notcloseOnProtocolViolation
- Flag to send close frame immediately on any protocol violation.ion.withUTF8Validator
- Allows you to avoid adding of Utf8FrameValidator to the pipeline on the WebSocketServerProtocolHandler creation. This is useful (less overhead) when you use only BinaryWebSocketFrame within your web socket connection.
-
-
Method Detail
-
maxFramePayloadLength
public int maxFramePayloadLength()
-
expectMaskedFrames
public boolean expectMaskedFrames()
-
allowMaskMismatch
public boolean allowMaskMismatch()
-
allowExtensions
public boolean allowExtensions()
-
closeOnProtocolViolation
public boolean closeOnProtocolViolation()
-
withUTF8Validator
public boolean withUTF8Validator()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toBuilder
public WebSocketDecoderConfig.Builder toBuilder()
-
newBuilder
public static WebSocketDecoderConfig.Builder newBuilder()
-
-