OioSctpChannel Class — netty Architecture
Architecture documentation for the OioSctpChannel class in OioSctpChannel.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 0e982d34_5d94_834c_1668_451f9d08d74b["OioSctpChannel"] 6f9ec53b_8659_5ec6_5c07_3e0092a1af69["OioSctpChannel.java"] 0e982d34_5d94_834c_1668_451f9d08d74b -->|defined in| 6f9ec53b_8659_5ec6_5c07_3e0092a1af69 73d5eb36_ddac_2c8f_722b_c00ddfa8e126["SctpChannel()"] 0e982d34_5d94_834c_1668_451f9d08d74b -->|method| 73d5eb36_ddac_2c8f_722b_c00ddfa8e126 aa67bcf0_94e3_2ac3_2243_54142998d882["OioSctpChannel()"] 0e982d34_5d94_834c_1668_451f9d08d74b -->|method| aa67bcf0_94e3_2ac3_2243_54142998d882 a0d85db5_8408_20f5_eee1_afcb7f0d739f["InetSocketAddress()"] 0e982d34_5d94_834c_1668_451f9d08d74b -->|method| a0d85db5_8408_20f5_eee1_afcb7f0d739f 1bf058dd_8ff3_0559_47f6_30fe7fd2a23d["SctpServerChannel()"] 0e982d34_5d94_834c_1668_451f9d08d74b -->|method| 1bf058dd_8ff3_0559_47f6_30fe7fd2a23d 9de2f940_93b8_0e43_6bb6_38a8ba92fcd9["ChannelMetadata()"] 0e982d34_5d94_834c_1668_451f9d08d74b -->|method| 9de2f940_93b8_0e43_6bb6_38a8ba92fcd9 7b981ffb_ec70_80de_8152_e99f9677aa3d["SctpChannelConfig()"] 0e982d34_5d94_834c_1668_451f9d08d74b -->|method| 7b981ffb_ec70_80de_8152_e99f9677aa3d 89375452_19bd_181e_bf20_006d404d30b8["isOpen()"] 0e982d34_5d94_834c_1668_451f9d08d74b -->|method| 89375452_19bd_181e_bf20_006d404d30b8 29800e14_3a2a_9b5f_2cf5_0cb009d693b6["doReadMessages()"] 0e982d34_5d94_834c_1668_451f9d08d74b -->|method| 29800e14_3a2a_9b5f_2cf5_0cb009d693b6 cc344cee_e904_6e51_4c3f_0c11b49c0324["doWrite()"] 0e982d34_5d94_834c_1668_451f9d08d74b -->|method| cc344cee_e904_6e51_4c3f_0c11b49c0324 e290c2a7_e892_925e_c7d5_b2453023a850["Object()"] 0e982d34_5d94_834c_1668_451f9d08d74b -->|method| e290c2a7_e892_925e_c7d5_b2453023a850 d51557f0_3bc9_7aec_2a00_96e2a8a2e16c["Association()"] 0e982d34_5d94_834c_1668_451f9d08d74b -->|method| d51557f0_3bc9_7aec_2a00_96e2a8a2e16c d5fb2ad3_f184_36f7_2848_628096a82acc["isActive()"] 0e982d34_5d94_834c_1668_451f9d08d74b -->|method| d5fb2ad3_f184_36f7_2848_628096a82acc d594cb1a_0a8f_9672_7d94_7deedc614792["SocketAddress()"] 0e982d34_5d94_834c_1668_451f9d08d74b -->|method| d594cb1a_0a8f_9672_7d94_7deedc614792
Relationship Graph
Source Code
transport-sctp/src/main/java/io/netty/channel/sctp/oio/OioSctpChannel.java lines 64–503
@Deprecated
public class OioSctpChannel extends AbstractOioMessageChannel
implements io.netty.channel.sctp.SctpChannel {
private static final InternalLogger logger =
InternalLoggerFactory.getInstance(OioSctpChannel.class);
private static final ChannelMetadata METADATA = new ChannelMetadata(false);
private static final String EXPECTED_TYPE = " (expected: " + StringUtil.simpleClassName(SctpMessage.class) + ')';
private final SctpChannel ch;
private final SctpChannelConfig config;
private final Selector readSelector;
private final Selector writeSelector;
private final Selector connectSelector;
private final NotificationHandler<?> notificationHandler;
private ByteBuffer inputCopy;
private ByteBuffer outputCopy;
private static SctpChannel openChannel() {
try {
return SctpChannel.open();
} catch (IOException e) {
throw new ChannelException("Failed to open a sctp channel.", e);
}
}
/**
* Create a new instance with an new {@link SctpChannel}.
*/
public OioSctpChannel() {
this(openChannel());
}
/**
* Create a new instance from the given {@link SctpChannel}.
*
* @param ch the {@link SctpChannel} which is used by this instance
*/
public OioSctpChannel(SctpChannel ch) {
this(null, ch);
}
/**
* Create a new instance from the given {@link SctpChannel}.
*
* @param parent the parent {@link Channel} which was used to create this instance. This can be null if the
* {@link} has no parent as it was created by your self.
* @param ch the {@link SctpChannel} which is used by this instance
*/
public OioSctpChannel(Channel parent, SctpChannel ch) {
super(parent);
this.ch = ch;
boolean success = false;
try {
ch.configureBlocking(false);
readSelector = Selector.open();
writeSelector = Selector.open();
connectSelector = Selector.open();
ch.register(readSelector, SelectionKey.OP_READ);
ch.register(writeSelector, SelectionKey.OP_WRITE);
ch.register(connectSelector, SelectionKey.OP_CONNECT);
config = new OioSctpChannelConfig(this, ch);
notificationHandler = new SctpNotificationHandler(this);
success = true;
} catch (Exception e) {
throw new ChannelException("failed to initialize a sctp channel", e);
} finally {
if (!success) {
try {
ch.close();
} catch (IOException e) {
logger.warn("Failed to close a sctp channel.", e);
}
}
}
}
Source
Frequently Asked Questions
What is the OioSctpChannel class?
OioSctpChannel is a class in the netty codebase, defined in transport-sctp/src/main/java/io/netty/channel/sctp/oio/OioSctpChannel.java.
Where is OioSctpChannel defined?
OioSctpChannel is defined in transport-sctp/src/main/java/io/netty/channel/sctp/oio/OioSctpChannel.java at line 64.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free