public class RtspDecoder extends HttpObjectDecoder
ByteBufs into RTSP messages represented in
 HttpMessages.
 
| 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, aTooLongFrameExceptionwill be raised. | 
| maxHeaderSize | The maximum length of all headers. If the sum of the length of each
     header exceeds this value, a TooLongFrameExceptionwill be
     raised. | 
| maxContentLength | The maximum length of the content.  If the content length exceeds this
     value, a TooLongFrameExceptionwill be raised. | 
ByteToMessageDecoder.CumulatorChannelHandler.Sharable| Modifier and Type | Field and Description | 
|---|---|
| static int | DEFAULT_MAX_CONTENT_LENGTHConstant for default max content length. | 
| static int | DEFAULT_MAX_HEADER_SIZEConstant for default max header size. | 
| static int | DEFAULT_MAX_INITIAL_LINE_LENGTHConstant for default max initial line length. | 
validateHeadersCOMPOSITE_CUMULATOR, MERGE_CUMULATOR| Constructor and Description | 
|---|
| RtspDecoder()Creates a new instance with the default
  maxInitialLineLength (4096),maxHeaderSize (8192), andmaxContentLength (8192). | 
| RtspDecoder(int maxInitialLineLength,
           int maxHeaderSize,
           int maxContentLength)Creates a new instance with the specified parameters. | 
| RtspDecoder(int maxInitialLineLength,
           int maxHeaderSize,
           int maxContentLength,
           boolean validateHeaders)Creates a new instance with the specified parameters. | 
| 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, userEventTriggeredactualReadableBytes, callDecode, channelInactive, channelRead, channelReadComplete, discardSomeReadBytes, handlerRemoved, handlerRemoved0, internalBuffer, isSingleDecode, setCumulator, setDiscardAfterReads, setSingleDecodechannelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaughtensureNotSharable, handlerAdded, isSharableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandlerAddedpublic 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), 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 lengthpublic RtspDecoder(int maxInitialLineLength,
                   int maxHeaderSize,
                   int maxContentLength,
                   boolean validateHeaders)
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 validatedprotected HttpMessage createMessage(java.lang.String[] initialLine) throws java.lang.Exception
createMessage in class HttpObjectDecoderjava.lang.Exceptionprotected boolean isContentAlwaysEmpty(HttpMessage msg)
isContentAlwaysEmpty in class HttpObjectDecoderprotected HttpMessage createInvalidMessage()
createInvalidMessage in class HttpObjectDecoderprotected boolean isDecodingRequest()
isDecodingRequest in class HttpObjectDecoderCopyright © 2008–2018 The Netty Project. All rights reserved.