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 receivesSctpMessage
s 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 boolean
acceptInboundMessage(SctpMessage msg)
boolean
acceptInboundMessage(java.lang.Object msg)
Returnstrue
if the given message should be handled.protected void
decode(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.Exception
Description copied from class:MessageToMessageDecoder
Returnstrue
if the given message should be handled. Iffalse
it will be passed to the nextChannelInboundHandler
in theChannelPipeline
.- Overrides:
acceptInboundMessage
in 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:MessageToMessageDecoder
Decode from one message to an other. This method will be called for each written message that can be handled by this decoder.- Specified by:
decode
in classMessageToMessageDecoder<SctpMessage>
- Parameters:
ctx
- theChannelHandlerContext
which thisMessageToMessageDecoder
belongs tomsg
- the message to decode to an other oneout
- theList
to which decoded messages should be added- Throws:
java.lang.Exception
- is thrown if an error occurs
-
-