Package io.netty.handler.codec.sctp
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
public class SctpInboundByteStreamHandler extends MessageToMessageDecoder<SctpMessage>
A ChannelHandler which receivesSctpMessages which belong to a application protocol form a specific SCTP Stream and decode it asByteBuf.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
ChannelHandler.Sharable
-
-
Constructor Summary
Constructors Constructor Description SctpInboundByteStreamHandler(int protocolIdentifier, int streamIdentifier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanacceptInboundMessage(SctpMessage msg)booleanacceptInboundMessage(java.lang.Object msg)Returnstrueif the given message should be handled.protected voiddecode(ChannelHandlerContext ctx, SctpMessage msg, java.util.List<java.lang.Object> out)Decode from one message to an other.-
Methods inherited from class io.netty.handler.codec.MessageToMessageDecoder
channelRead, channelReadComplete
-
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.netty.channel.ChannelHandler
handlerAdded, handlerRemoved
-
-
-
-
Constructor Detail
-
SctpInboundByteStreamHandler
public SctpInboundByteStreamHandler(int protocolIdentifier, int streamIdentifier)- Parameters:
streamIdentifier- accepted stream number, this should be >=0 or <= max stream number of the association.protocolIdentifier- supported application protocol.
-
-
Method Detail
-
acceptInboundMessage
public final boolean acceptInboundMessage(java.lang.Object msg) throws java.lang.ExceptionDescription copied from class:MessageToMessageDecoderReturnstrueif the given message should be handled. Iffalseit will be passed to the nextChannelInboundHandlerin theChannelPipeline.- Overrides:
acceptInboundMessagein classMessageToMessageDecoder<SctpMessage>- Throws:
java.lang.Exception
-
acceptInboundMessage
protected boolean acceptInboundMessage(SctpMessage msg)
-
decode
protected void decode(ChannelHandlerContext ctx, SctpMessage msg, java.util.List<java.lang.Object> out) throws java.lang.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:
java.lang.Exception- is thrown if an error occurs
-
-