EmbeddedDatagramChannel Class — netty Architecture
Architecture documentation for the EmbeddedDatagramChannel class in PcapWriteHandlerTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD c0d13065_fec1_fd07_1707_fe4e5c1a2369["EmbeddedDatagramChannel"] 993bdeb0_5d47_ce1b_c810_8cb22b3c3900["PcapWriteHandlerTest.java"] c0d13065_fec1_fd07_1707_fe4e5c1a2369 -->|defined in| 993bdeb0_5d47_ce1b_c810_8cb22b3c3900 5c425ce6_e952_d363_e0ef_0934a41b930a["EmbeddedDatagramChannel()"] c0d13065_fec1_fd07_1707_fe4e5c1a2369 -->|method| 5c425ce6_e952_d363_e0ef_0934a41b930a ee89d830_e5c5_a07d_ad03_f23094151a9f["isConnected()"] c0d13065_fec1_fd07_1707_fe4e5c1a2369 -->|method| ee89d830_e5c5_a07d_ad03_f23094151a9f 9301e14e_4653_e15b_d3eb_aab781826b57["DatagramChannelConfig()"] c0d13065_fec1_fd07_1707_fe4e5c1a2369 -->|method| 9301e14e_4653_e15b_d3eb_aab781826b57 201e7e9e_c23c_b328_ecb1_117026fc1c03["InetSocketAddress()"] c0d13065_fec1_fd07_1707_fe4e5c1a2369 -->|method| 201e7e9e_c23c_b328_ecb1_117026fc1c03 7f5eb346_e3e3_3b22_84f1_1493e94237cd["SocketAddress()"] c0d13065_fec1_fd07_1707_fe4e5c1a2369 -->|method| 7f5eb346_e3e3_3b22_84f1_1493e94237cd e1b4abac_eebe_c0c7_b4ce_0b95a65e1a6c["ChannelFuture()"] c0d13065_fec1_fd07_1707_fe4e5c1a2369 -->|method| e1b4abac_eebe_c0c7_b4ce_0b95a65e1a6c
Relationship Graph
Source Code
handler/src/test/java/io/netty/handler/pcap/PcapWriteHandlerTest.java lines 1341–1496
private static class EmbeddedDatagramChannel extends EmbeddedChannel implements DatagramChannel {
private final InetSocketAddress local;
private final InetSocketAddress remote;
private DatagramChannelConfig config;
EmbeddedDatagramChannel(InetSocketAddress local, InetSocketAddress remote) {
super(DefaultChannelId.newInstance(), false);
this.local = local;
this.remote = remote;
}
@Override
public boolean isConnected() {
return true;
}
@Override
public DatagramChannelConfig config() {
if (config == null) {
// ick! config() is called by the super constructor, so we need to do this.
try {
config = new DefaultDatagramChannelConfig(this, new DatagramSocket());
} catch (SocketException e) {
throw new RuntimeException(e);
}
}
return config;
}
@Override
public InetSocketAddress localAddress() {
return (InetSocketAddress) super.localAddress();
}
@Override
public InetSocketAddress remoteAddress() {
return (InetSocketAddress) super.remoteAddress();
}
@Override
protected SocketAddress localAddress0() {
return local;
}
@Override
protected SocketAddress remoteAddress0() {
return remote;
}
@Override
public ChannelFuture joinGroup(InetAddress multicastAddress) {
throw new UnsupportedOperationException();
}
@Override
public ChannelFuture joinGroup(InetAddress multicastAddress, ChannelPromise future) {
throw new UnsupportedOperationException();
}
@Override
public ChannelFuture joinGroup(InetSocketAddress multicastAddress, NetworkInterface networkInterface) {
throw new UnsupportedOperationException();
}
@Override
public ChannelFuture joinGroup(
InetSocketAddress multicastAddress,
NetworkInterface networkInterface,
ChannelPromise future) {
throw new UnsupportedOperationException();
}
@Override
public ChannelFuture joinGroup(
InetAddress multicastAddress,
NetworkInterface networkInterface,
InetAddress source) {
throw new UnsupportedOperationException();
}
@Override
Source
Frequently Asked Questions
What is the EmbeddedDatagramChannel class?
EmbeddedDatagramChannel is a class in the netty codebase, defined in handler/src/test/java/io/netty/handler/pcap/PcapWriteHandlerTest.java.
Where is EmbeddedDatagramChannel defined?
EmbeddedDatagramChannel is defined in handler/src/test/java/io/netty/handler/pcap/PcapWriteHandlerTest.java at line 1341.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free