SctpInboundByteStreamHandler Class — netty Architecture
Architecture documentation for the SctpInboundByteStreamHandler class in SctpInboundByteStreamHandler.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 2db481c3_4b9e_ddf1_cee8_509bb3dbc41c["SctpInboundByteStreamHandler"] 822fc77d_b745_32cc_42c8_f4af53c98a83["SctpInboundByteStreamHandler.java"] 2db481c3_4b9e_ddf1_cee8_509bb3dbc41c -->|defined in| 822fc77d_b745_32cc_42c8_f4af53c98a83 a9173a16_917d_7c0e_ab4b_219ac112597d["SctpInboundByteStreamHandler()"] 2db481c3_4b9e_ddf1_cee8_509bb3dbc41c -->|method| a9173a16_917d_7c0e_ab4b_219ac112597d 5cb897eb_9128_45a3_464a_3d061ba6b4ce["acceptInboundMessage()"] 2db481c3_4b9e_ddf1_cee8_509bb3dbc41c -->|method| 5cb897eb_9128_45a3_464a_3d061ba6b4ce 3b939dd2_a6e9_9f41_f16c_69efefbb11ed["decode()"] 2db481c3_4b9e_ddf1_cee8_509bb3dbc41c -->|method| 3b939dd2_a6e9_9f41_f16c_69efefbb11ed
Relationship Graph
Source Code
transport-sctp/src/main/java/io/netty/handler/codec/sctp/SctpInboundByteStreamHandler.java lines 31–65
public class SctpInboundByteStreamHandler extends MessageToMessageDecoder<SctpMessage> {
private final int protocolIdentifier;
private final int streamIdentifier;
/**
* @param streamIdentifier accepted stream number, this should be >=0 or <= max stream number of the association.
* @param protocolIdentifier supported application protocol.
*/
public SctpInboundByteStreamHandler(int protocolIdentifier, int streamIdentifier) {
super(SctpMessage.class);
this.protocolIdentifier = protocolIdentifier;
this.streamIdentifier = streamIdentifier;
}
@Override
public final boolean acceptInboundMessage(Object msg) throws Exception {
if (super.acceptInboundMessage(msg)) {
return acceptInboundMessage((SctpMessage) msg);
}
return false;
}
protected boolean acceptInboundMessage(SctpMessage msg) {
return msg.protocolIdentifier() == protocolIdentifier && msg.streamIdentifier() == streamIdentifier;
}
@Override
protected void decode(ChannelHandlerContext ctx, SctpMessage msg, List<Object> out) throws Exception {
if (!msg.isComplete()) {
throw new CodecException(String.format("Received SctpMessage is not complete, please add %s in the " +
"pipeline before this handler", SctpMessageCompletionHandler.class.getSimpleName()));
}
out.add(msg.content().retain());
}
}
Defined In
Source
Frequently Asked Questions
What is the SctpInboundByteStreamHandler class?
SctpInboundByteStreamHandler is a class in the netty codebase, defined in transport-sctp/src/main/java/io/netty/handler/codec/sctp/SctpInboundByteStreamHandler.java.
Where is SctpInboundByteStreamHandler defined?
SctpInboundByteStreamHandler is defined in transport-sctp/src/main/java/io/netty/handler/codec/sctp/SctpInboundByteStreamHandler.java at line 31.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free