NioUdtMessageConnectorChannel Class — netty Architecture
Architecture documentation for the NioUdtMessageConnectorChannel class in NioUdtMessageConnectorChannel.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 06bc0141_1480_880a_48f9_8a253c01da1f["NioUdtMessageConnectorChannel"] 0117d686_4115_801f_2a6d_2d2bff43af16["NioUdtMessageConnectorChannel.java"] 06bc0141_1480_880a_48f9_8a253c01da1f -->|defined in| 0117d686_4115_801f_2a6d_2d2bff43af16 56ff5a36_aca3_3c04_ab40_57179db6bd09["NioUdtMessageConnectorChannel()"] 06bc0141_1480_880a_48f9_8a253c01da1f -->|method| 56ff5a36_aca3_3c04_ab40_57179db6bd09 85e34231_f33c_a8a6_6121_101be760169c["UdtChannelConfig()"] 06bc0141_1480_880a_48f9_8a253c01da1f -->|method| 85e34231_f33c_a8a6_6121_101be760169c 20041cfd_c0eb_d2d0_c550_a15eccef2815["doBind()"] 06bc0141_1480_880a_48f9_8a253c01da1f -->|method| 20041cfd_c0eb_d2d0_c550_a15eccef2815 156c3317_9b46_9344_a1b8_ac40dd86311b["doClose()"] 06bc0141_1480_880a_48f9_8a253c01da1f -->|method| 156c3317_9b46_9344_a1b8_ac40dd86311b e692ed96_e78c_8ca3_c6ad_34ccae59a3cf["doConnect()"] 06bc0141_1480_880a_48f9_8a253c01da1f -->|method| e692ed96_e78c_8ca3_c6ad_34ccae59a3cf 3b45cde2_b6a3_2767_bf4a_e8d3a09b61f2["doDisconnect()"] 06bc0141_1480_880a_48f9_8a253c01da1f -->|method| 3b45cde2_b6a3_2767_bf4a_e8d3a09b61f2 2c5595b2_a4c8_d583_c321_f8505c191163["doFinishConnect()"] 06bc0141_1480_880a_48f9_8a253c01da1f -->|method| 2c5595b2_a4c8_d583_c321_f8505c191163 15c0a337_3992_c373_c611_1ed18081aed4["doReadMessages()"] 06bc0141_1480_880a_48f9_8a253c01da1f -->|method| 15c0a337_3992_c373_c611_1ed18081aed4 455a5a70_79f9_b6fc_9b88_aa6fe00937f8["doWriteMessage()"] 06bc0141_1480_880a_48f9_8a253c01da1f -->|method| 455a5a70_79f9_b6fc_9b88_aa6fe00937f8 3eb7ac73_9b0c_ca73_d15f_fbeb60676545["isActive()"] 06bc0141_1480_880a_48f9_8a253c01da1f -->|method| 3eb7ac73_9b0c_ca73_d15f_fbeb60676545 30e765b4_5887_324b_480e_fc877aaaba8c["SocketChannelUDT()"] 06bc0141_1480_880a_48f9_8a253c01da1f -->|method| 30e765b4_5887_324b_480e_fc877aaaba8c 29bbfa06_e985_191a_81d1_3755a8df4af2["SocketAddress()"] 06bc0141_1480_880a_48f9_8a253c01da1f -->|method| 29bbfa06_e985_191a_81d1_3755a8df4af2 605eccf6_1f29_3809_5eac_a47f5d742078["ChannelMetadata()"] 06bc0141_1480_880a_48f9_8a253c01da1f -->|method| 605eccf6_1f29_3809_5eac_a47f5d742078
Relationship Graph
Source Code
transport-udt/src/main/java/io/netty/channel/udt/nio/NioUdtMessageConnectorChannel.java lines 51–252
@Deprecated
public class NioUdtMessageConnectorChannel extends AbstractNioMessageChannel implements UdtChannel {
private static final InternalLogger logger =
InternalLoggerFactory.getInstance(NioUdtMessageConnectorChannel.class);
private static final ChannelMetadata METADATA = new ChannelMetadata(false);
private final UdtChannelConfig config;
public NioUdtMessageConnectorChannel() {
this(TypeUDT.DATAGRAM);
}
public NioUdtMessageConnectorChannel(final Channel parent, final SocketChannelUDT channelUDT) {
super(parent, channelUDT, NioIoOps.READ);
try {
channelUDT.configureBlocking(false);
switch (channelUDT.socketUDT().status()) {
case INIT:
case OPENED:
config = new DefaultUdtChannelConfig(this, channelUDT, true);
break;
default:
config = new DefaultUdtChannelConfig(this, channelUDT, false);
break;
}
} catch (final Exception e) {
try {
channelUDT.close();
} catch (final Exception e2) {
logger.warn("Failed to close channel.", e2);
}
throw new ChannelException("Failed to configure channel.", e);
}
}
public NioUdtMessageConnectorChannel(final SocketChannelUDT channelUDT) {
this(null, channelUDT);
}
public NioUdtMessageConnectorChannel(final TypeUDT type) {
this(NioUdtProvider.newConnectorChannelUDT(type));
}
@Override
public UdtChannelConfig config() {
return config;
}
@Override
protected void doBind(final SocketAddress localAddress) throws Exception {
privilegedBind(javaChannel(), localAddress);
}
@Override
protected void doClose() throws Exception {
javaChannel().close();
}
@Override
protected boolean doConnect(final SocketAddress remoteAddress,
final SocketAddress localAddress) throws Exception {
doBind(localAddress != null? localAddress : new InetSocketAddress(0));
boolean success = false;
try {
final boolean connected = SocketUtils.connect(javaChannel(), remoteAddress);
if (!connected) {
addAndSubmit(NioIoOps.CONNECT);
}
success = true;
return connected;
} finally {
if (!success) {
doClose();
}
}
}
@Override
protected void doDisconnect() throws Exception {
Source
Frequently Asked Questions
What is the NioUdtMessageConnectorChannel class?
NioUdtMessageConnectorChannel is a class in the netty codebase, defined in transport-udt/src/main/java/io/netty/channel/udt/nio/NioUdtMessageConnectorChannel.java.
Where is NioUdtMessageConnectorChannel defined?
NioUdtMessageConnectorChannel is defined in transport-udt/src/main/java/io/netty/channel/udt/nio/NioUdtMessageConnectorChannel.java at line 51.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free