Class SctpInboundByteStreamHandler
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.handler.codec.MessageToMessageDecoder<SctpMessage>
io.netty.handler.codec.sctp.SctpInboundByteStreamHandler
- All Implemented Interfaces:
ChannelHandler, ChannelInboundHandler
A ChannelHandler which receives
SctpMessages which belong to a application protocol form a specific
SCTP Stream and decode it as ByteBuf.-
Nested Class Summary
Nested classes/interfaces inherited from interface ChannelHandler
ChannelHandler.Sharable -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanfinal booleanReturnstrueif the given message should be handled.protected voiddecode(ChannelHandlerContext ctx, SctpMessage msg, List<Object> out) Decode from one message to an other.Methods inherited from class MessageToMessageDecoder
channelRead, channelReadCompleteMethods inherited from class ChannelInboundHandlerAdapter
channelActive, channelInactive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggeredMethods inherited from class ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharableMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ChannelHandler
handlerAdded, handlerRemoved
-
Constructor Details
-
SctpInboundByteStreamHandler
public SctpInboundByteStreamHandler(int protocolIdentifier, int streamIdentifier) - Parameters:
protocolIdentifier- supported application protocol.streamIdentifier- accepted stream number, this should be >=0 or invalid input: '<'= max stream number of the association.
-
-
Method Details
-
acceptInboundMessage
Description copied from class:MessageToMessageDecoderReturnstrueif the given message should be handled. Iffalseit will be passed to the nextChannelInboundHandlerin theChannelPipeline.- Overrides:
acceptInboundMessagein classMessageToMessageDecoder<SctpMessage>- Throws:
Exception
-
acceptInboundMessage
-
decode
protected void decode(ChannelHandlerContext ctx, SctpMessage msg, List<Object> out) throws Exception Description copied from class:MessageToMessageDecoderDecode from one message to an other. This method will be called for each written message that can be handled by this decoder.- Specified by:
decodein classMessageToMessageDecoder<SctpMessage>- Parameters:
ctx- theChannelHandlerContextwhich thisMessageToMessageDecoderbelongs tomsg- the message to decode to an other oneout- theListto which decoded messages should be added- Throws:
Exception- is thrown if an error occurs
-