public class RtspDecoder extends HttpObjectDecoder
ByteBuf
s into RTSP messages represented in
HttpMessage
s.
Name | Meaning |
---|---|
maxInitialLineLength |
The maximum length of the initial line
(e.g. "SETUP / RTSP/1.0" or "RTSP/1.0 200 OK" )
If the length of the initial line exceeds this value, a
TooLongFrameException will be raised. |
maxHeaderSize |
The maximum length of all headers. If the sum of the length of each
header exceeds this value, a TooLongFrameException will be
raised. |
maxContentLength |
The maximum length of the content. If the content length exceeds this
value, a TooLongFrameException will be raised. |
ByteToMessageDecoder.Cumulator
ChannelHandler.Sharable
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_CONTENT_LENGTH
Constant for default max content length.
|
DEFAULT_ALLOW_DUPLICATE_CONTENT_LENGTHS, DEFAULT_ALLOW_PARTIAL_CHUNKS, DEFAULT_CHUNKED_SUPPORTED, DEFAULT_INITIAL_BUFFER_SIZE, DEFAULT_MAX_CHUNK_SIZE, DEFAULT_MAX_HEADER_SIZE, DEFAULT_MAX_INITIAL_LINE_LENGTH, DEFAULT_VALIDATE_HEADERS, headersFactory, trailersFactory, validateHeaders
COMPOSITE_CUMULATOR, MERGE_CUMULATOR
Constructor and Description |
---|
RtspDecoder()
Creates a new instance with the default
maxInitialLineLength (4096) , maxHeaderSize (8192) , and
maxContentLength (8192) . |
RtspDecoder(HttpDecoderConfig config)
Creates a new instance with the specified configuration.
|
RtspDecoder(int maxInitialLineLength,
int maxHeaderSize,
int maxContentLength)
Creates a new instance with the specified parameters.
|
RtspDecoder(int maxInitialLineLength,
int maxHeaderSize,
int maxContentLength,
boolean validateHeaders)
Deprecated.
Use the
RtspDecoder(HttpDecoderConfig) constructor instead,
or the RtspDecoder(int, int, int) to always enable header validation. |
Modifier and Type | Method and Description |
---|---|
protected HttpMessage |
createInvalidMessage() |
protected HttpMessage |
createMessage(String[] initialLine) |
protected boolean |
isContentAlwaysEmpty(HttpMessage msg) |
protected boolean |
isDecodingRequest() |
decode, decodeLast, handlerRemoved0, handleTransferEncodingChunkedWithContentLength, isSwitchingToNonHttp1Protocol, isValidating, reset, splitFirstWordInitialLine, splitHeaderName, splitSecondWordInitialLine, splitThirdWordInitialLine, userEventTriggered
actualReadableBytes, callDecode, channelInactive, channelRead, channelReadComplete, discardSomeReadBytes, handlerRemoved, internalBuffer, isSingleDecode, setCumulator, setDiscardAfterReads, setSingleDecode
channelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught
ensureNotSharable, handlerAdded, isSharable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
handlerAdded
public static final int DEFAULT_MAX_CONTENT_LENGTH
public RtspDecoder()
maxInitialLineLength (4096)
, maxHeaderSize (8192)
, and
maxContentLength (8192)
.public RtspDecoder(int maxInitialLineLength, int maxHeaderSize, int maxContentLength)
maxInitialLineLength
- The max allowed length of initial linemaxHeaderSize
- The max allowed size of headermaxContentLength
- The max allowed content length@Deprecated public RtspDecoder(int maxInitialLineLength, int maxHeaderSize, int maxContentLength, boolean validateHeaders)
RtspDecoder(HttpDecoderConfig)
constructor instead,
or the RtspDecoder(int, int, int)
to always enable header validation.maxInitialLineLength
- The max allowed length of initial linemaxHeaderSize
- The max allowed size of headermaxContentLength
- The max allowed content lengthvalidateHeaders
- Set to true if headers should be validatedpublic RtspDecoder(HttpDecoderConfig config)
protected HttpMessage createMessage(String[] initialLine) throws Exception
createMessage
in class HttpObjectDecoder
Exception
protected boolean isContentAlwaysEmpty(HttpMessage msg)
isContentAlwaysEmpty
in class HttpObjectDecoder
protected HttpMessage createInvalidMessage()
createInvalidMessage
in class HttpObjectDecoder
protected boolean isDecodingRequest()
isDecodingRequest
in class HttpObjectDecoder
Copyright © 2008–2024 The Netty Project. All rights reserved.