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
A ChannelHandler which receives
SctpMessage
s 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 io.netty.channel.ChannelHandler
ChannelHandler.Sharable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
private final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
final boolean
Returnstrue
if the given message should be handled.protected void
decode
(ChannelHandlerContext ctx, SctpMessage msg, List<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
-
Field Details
-
protocolIdentifier
private final int protocolIdentifier -
streamIdentifier
private final int streamIdentifier
-
-
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: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:
Exception
-
acceptInboundMessage
-
decode
protected void decode(ChannelHandlerContext ctx, SctpMessage msg, List<Object> out) throws 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:
Exception
- is thrown if an error occurs
-