public class SctpInboundByteStreamHandler extends MessageToMessageDecoder<SctpMessage>
SctpMessage
s which belong to a application protocol form a specific
SCTP Stream and decode it as ByteBuf
.ChannelHandler.Sharable, ChannelHandler.Skip
Constructor and Description |
---|
SctpInboundByteStreamHandler(int protocolIdentifier,
int streamIdentifier) |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptInboundMessage(Object msg)
Returns
true if the given message should be handled. |
protected boolean |
acceptInboundMessage(SctpMessage msg) |
protected void |
decode(ChannelHandlerContext ctx,
SctpMessage msg,
List<Object> out)
Decode from one message to an other.
|
channelRead
bind, channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, close, connect, deregister, disconnect, exceptionCaught, flush, handlerAdded, handlerRemoved, isSharable, read, userEventTriggered, write
public SctpInboundByteStreamHandler(int protocolIdentifier, int streamIdentifier)
streamIdentifier
- accepted stream number, this should be >=0 or <= max stream number of the association.protocolIdentifier
- supported application protocol.public final boolean acceptInboundMessage(Object msg) throws Exception
MessageToMessageDecoder
true
if the given message should be handled. If false
it will be passed to the next
ChannelHandler
in the ChannelPipeline
.acceptInboundMessage
in class MessageToMessageDecoder<SctpMessage>
Exception
protected boolean acceptInboundMessage(SctpMessage msg)
protected void decode(ChannelHandlerContext ctx, SctpMessage msg, List<Object> out) throws Exception
MessageToMessageDecoder
decode
in class MessageToMessageDecoder<SctpMessage>
ctx
- the ChannelHandlerContext
which this MessageToMessageDecoder
belongs tomsg
- the message to decode to an other oneout
- the List
to which decoded messages should be addedException
- is thrown if an error accourCopyright © 2008–2015 The Netty Project. All rights reserved.