public class SctpInboundByteStreamHandler extends MessageToMessageDecoder<SctpMessage>
SctpMessage
的ChannelHandler形成特定的SCTP流并将其解码为ByteBuf
。
ChannelHandler.Sharable
Constructor and Description |
---|
SctpInboundByteStreamHandler(int protocolIdentifier, int streamIdentifier) |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptInboundMessage(java.lang.Object msg)
如果应该处理给定的消息,则返回
true 。
|
protected boolean |
acceptInboundMessage(SctpMessage msg) |
protected void |
decode(ChannelHandlerContext ctx, SctpMessage msg, java.util.List<java.lang.Object> out)
从一条消息解码到另一条消息。
|
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
- 接受的流号码,这应该是> = 0或<=最大流号码的关联。
protocolIdentifier
- 支持的应用程序协议。
public final boolean acceptInboundMessage(java.lang.Object msg) throws java.lang.Exception
MessageToMessageDecoder
true
。
如果false
它将被传递到ChannelInboundHandler
中的下一个ChannelInboundHandler
。
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
- MessageToMessageDecoder
所属的ChannelHandlerContext
msg
- 解码到另一个的消息
out
- 应该添加解码消息的
List
java.lang.Exception
- 发生错误时抛出
Copyright © 2008–2018 The Netty Project. All rights reserved.