NioUdtByteConnectorChannel Class — netty Architecture
Architecture documentation for the NioUdtByteConnectorChannel class in NioUdtByteConnectorChannel.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 2579800b_abdf_2512_fff2_d79024a6fa96["NioUdtByteConnectorChannel"] 1960ed9b_3edf_90e1_8a9a_43ee0e3a88bf["NioUdtByteConnectorChannel.java"] 2579800b_abdf_2512_fff2_d79024a6fa96 -->|defined in| 1960ed9b_3edf_90e1_8a9a_43ee0e3a88bf adb903a9_651b_1ce2_633a_491b0b8d334e["NioUdtByteConnectorChannel()"] 2579800b_abdf_2512_fff2_d79024a6fa96 -->|method| adb903a9_651b_1ce2_633a_491b0b8d334e 060b8d5b_b4fc_b519_c1a9_73124324ad71["UdtChannelConfig()"] 2579800b_abdf_2512_fff2_d79024a6fa96 -->|method| 060b8d5b_b4fc_b519_c1a9_73124324ad71 66e32a26_8c77_7612_013a_60b85ccac27e["doBind()"] 2579800b_abdf_2512_fff2_d79024a6fa96 -->|method| 66e32a26_8c77_7612_013a_60b85ccac27e 4a1da996_1ddf_c239_3856_8a290d021cea["doClose()"] 2579800b_abdf_2512_fff2_d79024a6fa96 -->|method| 4a1da996_1ddf_c239_3856_8a290d021cea bed44421_5dc2_aa3b_923f_797300c75dc2["doConnect()"] 2579800b_abdf_2512_fff2_d79024a6fa96 -->|method| bed44421_5dc2_aa3b_923f_797300c75dc2 3131833c_6698_7caf_aead_c03d08e5051d["doDisconnect()"] 2579800b_abdf_2512_fff2_d79024a6fa96 -->|method| 3131833c_6698_7caf_aead_c03d08e5051d 189c27c2_667d_c521_0d72_329c026270be["doFinishConnect()"] 2579800b_abdf_2512_fff2_d79024a6fa96 -->|method| 189c27c2_667d_c521_0d72_329c026270be 78698d14_2214_352c_6324_0d02c2a8adeb["doReadBytes()"] 2579800b_abdf_2512_fff2_d79024a6fa96 -->|method| 78698d14_2214_352c_6324_0d02c2a8adeb 5bace442_2f65_6809_ec7a_fc79a5be1082["doWriteBytes()"] 2579800b_abdf_2512_fff2_d79024a6fa96 -->|method| 5bace442_2f65_6809_ec7a_fc79a5be1082 24f41c8e_5b63_3ee9_5948_3e0fa34da7e5["ChannelFuture()"] 2579800b_abdf_2512_fff2_d79024a6fa96 -->|method| 24f41c8e_5b63_3ee9_5948_3e0fa34da7e5 9039000b_a8a1_31df_7024_54c3b4b24cb1["doWriteFileRegion()"] 2579800b_abdf_2512_fff2_d79024a6fa96 -->|method| 9039000b_a8a1_31df_7024_54c3b4b24cb1 0ea392de_1d39_2713_a51c_e720b808ee77["isActive()"] 2579800b_abdf_2512_fff2_d79024a6fa96 -->|method| 0ea392de_1d39_2713_a51c_e720b808ee77 97e9fac7_3a77_37ee_18f9_6113dc4f90f8["SocketChannelUDT()"] 2579800b_abdf_2512_fff2_d79024a6fa96 -->|method| 97e9fac7_3a77_37ee_18f9_6113dc4f90f8
Relationship Graph
Source Code
transport-udt/src/main/java/io/netty/channel/udt/nio/NioUdtByteConnectorChannel.java lines 47–210
@Deprecated
public class NioUdtByteConnectorChannel extends AbstractNioByteChannel implements UdtChannel {
private static final InternalLogger logger =
InternalLoggerFactory.getInstance(NioUdtByteConnectorChannel.class);
private final UdtChannelConfig config;
public NioUdtByteConnectorChannel() {
this(TypeUDT.STREAM);
}
public NioUdtByteConnectorChannel(final Channel parent, final SocketChannelUDT channelUDT) {
super(parent, channelUDT);
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) {
if (logger.isWarnEnabled()) {
logger.warn("Failed to close channel.", e2);
}
}
throw new ChannelException("Failed to configure channel.", e);
}
}
public NioUdtByteConnectorChannel(final SocketChannelUDT channelUDT) {
this(null, channelUDT);
}
public NioUdtByteConnectorChannel(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 NioUdtByteConnectorChannel class?
NioUdtByteConnectorChannel is a class in the netty codebase, defined in transport-udt/src/main/java/io/netty/channel/udt/nio/NioUdtByteConnectorChannel.java.
Where is NioUdtByteConnectorChannel defined?
NioUdtByteConnectorChannel is defined in transport-udt/src/main/java/io/netty/channel/udt/nio/NioUdtByteConnectorChannel.java at line 47.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free