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
构造器和说明 |
---|
SctpInboundByteStreamHandler(int protocolIdentifier,
int streamIdentifier) |
限定符和类型 | 方法和说明 |
---|---|
boolean |
acceptInboundMessage(java.lang.Object msg)
Returns
true if the given message should be handled. |
protected boolean |
acceptInboundMessage(SctpMessage msg) |
protected void |
decode(ChannelHandlerContext ctx,
SctpMessage msg,
java.util.List<java.lang.Object> out)
Decode from one message to an other.
|
channelRead
channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
handlerAdded, handlerRemoved
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(java.lang.Object msg) throws java.lang.Exception
MessageToMessageDecoder
true
if the given message should be handled. If false
it will be passed to the next
ChannelInboundHandler
in the ChannelPipeline
.acceptInboundMessage
在类中 MessageToMessageDecoder<SctpMessage>
java.lang.Exception
protected boolean acceptInboundMessage(SctpMessage msg)
protected void decode(ChannelHandlerContext ctx, SctpMessage msg, java.util.List<java.lang.Object> out) throws java.lang.Exception
MessageToMessageDecoder
decode
在类中 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 addedjava.lang.Exception
- is thrown if an error occurs