public class RtspDecoder extends HttpObjectDecoder
ByteBuf
s转换中表示RTSP消息HttpMessage
秒。
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
默认最大内容长度为常量。
|
static int |
DEFAULT_MAX_HEADER_SIZE
默认最大标题大小为常量。
|
static int |
DEFAULT_MAX_INITIAL_LINE_LENGTH
常量默认最大初始行长度。
|
validateHeaders
COMPOSITE_CUMULATOR, MERGE_CUMULATOR
Constructor and Description |
---|
RtspDecoder()
使用默认的一个新的实例
maxInitialLineLength (4096) ,
maxHeaderSize (8192) 和
maxContentLength (8192) 。
|
RtspDecoder(int maxInitialLineLength, int maxHeaderSize, int maxContentLength)
用指定的参数创建一个新的实例。
|
RtspDecoder(int maxInitialLineLength, int maxHeaderSize, int maxContentLength, boolean validateHeaders)
用指定的参数创建一个新的实例。
|
Modifier and Type | Method and Description |
---|---|
protected HttpMessage |
createInvalidMessage() |
protected HttpMessage |
createMessage(java.lang.String[] initialLine) |
protected boolean |
isContentAlwaysEmpty(HttpMessage msg) |
protected boolean |
isDecodingRequest() |
decode, decodeLast, isSwitchingToNonHttp1Protocol, reset, userEventTriggered
actualReadableBytes, callDecode, channelInactive, channelRead, channelReadComplete, discardSomeReadBytes, handlerRemoved, handlerRemoved0, 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_INITIAL_LINE_LENGTH
public static final int DEFAULT_MAX_HEADER_SIZE
public static final int DEFAULT_MAX_CONTENT_LENGTH
public RtspDecoder()
maxInitialLineLength (4096)
,
maxHeaderSize (8192)
和
maxContentLength (8192)
。
public RtspDecoder(int maxInitialLineLength, int maxHeaderSize, int maxContentLength)
maxInitialLineLength
- 起始行的最大允许长度
maxHeaderSize
- 标头允许的最大尺寸
maxContentLength
- 允许的最大内容长度
public RtspDecoder(int maxInitialLineLength, int maxHeaderSize, int maxContentLength, boolean validateHeaders)
maxInitialLineLength
- 起始行的最大允许长度
maxHeaderSize
- 标头允许的最大尺寸
maxContentLength
- 允许的最大内容长度
validateHeaders
- 如果头文件需要验证,则设置为true
protected HttpMessage createMessage(java.lang.String[] initialLine) throws java.lang.Exception
createMessage
在课程
HttpObjectDecoder
java.lang.Exception
protected boolean isContentAlwaysEmpty(HttpMessage msg)
protected HttpMessage createInvalidMessage()
createInvalidMessage
在课程
HttpObjectDecoder
protected boolean isDecodingRequest()
isDecodingRequest
在课程
HttpObjectDecoder
Copyright © 2008–2018 The Netty Project. All rights reserved.