Home / Class/ EpollDatagramUnicastTest Class — netty Architecture

EpollDatagramUnicastTest Class — netty Architecture

Architecture documentation for the EpollDatagramUnicastTest class in EpollDatagramUnicastTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  10b176d1_e8aa_bbf1_f1ba_fff123bd29ed["EpollDatagramUnicastTest"]
  48f74db0_8c93_43ef_0783_d379fc8e4e34["EpollDatagramUnicastTest.java"]
  10b176d1_e8aa_bbf1_f1ba_fff123bd29ed -->|defined in| 48f74db0_8c93_43ef_0783_d379fc8e4e34
  3bdbb076_5dca_8f6c_b4d5_e3f7267e8b1e["newFactories()"]
  10b176d1_e8aa_bbf1_f1ba_fff123bd29ed -->|method| 3bdbb076_5dca_8f6c_b4d5_e3f7267e8b1e
  472f37a9_27e2_6b9f_672d_48bf908dbe0c["testSimpleSendWithConnect()"]
  10b176d1_e8aa_bbf1_f1ba_fff123bd29ed -->|method| 472f37a9_27e2_6b9f_672d_48bf908dbe0c
  40e5559a_8bb3_69ec_7015_26c5d0fef26f["testSendSegmentedDatagramPacket()"]
  10b176d1_e8aa_bbf1_f1ba_fff123bd29ed -->|method| 40e5559a_8bb3_69ec_7015_26c5d0fef26f
  2909acef_b4a5_779b_fa63_c915521960f2["testSendSegmentedDatagramPacketComposite()"]
  10b176d1_e8aa_bbf1_f1ba_fff123bd29ed -->|method| 2909acef_b4a5_779b_fa63_c915521960f2
  be3da79c_1075_12e7_f994_20abfde6fd28["testSendAndReceiveSegmentedDatagramPacket()"]
  10b176d1_e8aa_bbf1_f1ba_fff123bd29ed -->|method| be3da79c_1075_12e7_f994_20abfde6fd28
  84e1b9f9_05e2_f4c4_3a1a_50a4b5cdce43["testSendAndReceiveSegmentedDatagramPacketComposite()"]
  10b176d1_e8aa_bbf1_f1ba_fff123bd29ed -->|method| 84e1b9f9_05e2_f4c4_3a1a_50a4b5cdce43
  95e5314a_d0ff_6db1_b1ae_6c079f85dd17["testSegmentedDatagramPacket()"]
  10b176d1_e8aa_bbf1_f1ba_fff123bd29ed -->|method| 95e5314a_d0ff_6db1_b1ae_6c079f85dd17

Relationship Graph

Source Code

transport-native-epoll/src/test/java/io/netty/channel/epoll/EpollDatagramUnicastTest.java lines 45–194

public class EpollDatagramUnicastTest extends DatagramUnicastInetTest {
    @Override
    protected List<TestsuitePermutation.BootstrapComboFactory<Bootstrap, Bootstrap>> newFactories() {
        return EpollSocketTestPermutation.INSTANCE.datagram(SocketProtocolFamily.INET);
    }

    public void testSimpleSendWithConnect(Bootstrap sb, Bootstrap cb) throws Throwable {
        // Run this test with IP_RECVORIGDSTADDR option enabled
        sb.option(EpollChannelOption.IP_RECVORIGDSTADDR, true);
        super.testSimpleSendWithConnect(sb, cb);
        sb.option(EpollChannelOption.IP_RECVORIGDSTADDR, false);
    }

    @Test
    public void testSendSegmentedDatagramPacket(TestInfo testInfo) throws Throwable {
        run(testInfo, new Runner<Bootstrap, Bootstrap>() {
            @Override
            public void run(Bootstrap bootstrap, Bootstrap bootstrap2) throws Throwable {
                testSendSegmentedDatagramPacket(bootstrap, bootstrap2);
            }
        });
    }

    public void testSendSegmentedDatagramPacket(Bootstrap sb, Bootstrap cb) throws Throwable {
        testSegmentedDatagramPacket(sb, cb, false, false);
    }

    @Test
    public void testSendSegmentedDatagramPacketComposite(TestInfo testInfo) throws Throwable {
        run(testInfo, new Runner<Bootstrap, Bootstrap>() {
            @Override
            public void run(Bootstrap bootstrap, Bootstrap bootstrap2) throws Throwable {
                testSendSegmentedDatagramPacketComposite(bootstrap, bootstrap2);
            }
        });
    }

    public void testSendSegmentedDatagramPacketComposite(Bootstrap sb, Bootstrap cb) throws Throwable {
        testSegmentedDatagramPacket(sb, cb, true, false);
    }

    @Test
    public void testSendAndReceiveSegmentedDatagramPacket(TestInfo testInfo) throws Throwable {
        run(testInfo, new Runner<Bootstrap, Bootstrap>() {
            @Override
            public void run(Bootstrap bootstrap, Bootstrap bootstrap2) throws Throwable {
                testSendAndReceiveSegmentedDatagramPacket(bootstrap, bootstrap2);
            }
        });
    }

    public void testSendAndReceiveSegmentedDatagramPacket(Bootstrap sb, Bootstrap cb) throws Throwable {
        testSegmentedDatagramPacket(sb, cb, false, true);
    }

    @Test
    public void testSendAndReceiveSegmentedDatagramPacketComposite(TestInfo testInfo) throws Throwable {
        run(testInfo, new Runner<Bootstrap, Bootstrap>() {
            @Override
            public void run(Bootstrap bootstrap, Bootstrap bootstrap2) throws Throwable {
                testSendAndReceiveSegmentedDatagramPacketComposite(bootstrap, bootstrap2);
            }
        });
    }

    public void testSendAndReceiveSegmentedDatagramPacketComposite(Bootstrap sb, Bootstrap cb) throws Throwable {
        testSegmentedDatagramPacket(sb, cb, true, true);
    }

    private void testSegmentedDatagramPacket(Bootstrap sb, Bootstrap cb, boolean composite, boolean gro)
            throws Throwable {
        if (!(cb.group() instanceof IoEventLoopGroup &&
                ((IoEventLoopGroup) cb.group()).isIoType(EpollIoHandler.class))) {
            // Only supported for the native epoll transport.
            return;
        }

        if (gro && !(sb.group() instanceof IoEventLoopGroup) &&
                ((IoEventLoopGroup) sb.group()).isIoType(EpollIoHandler.class)) {
            // Only supported for the native epoll transport.
            return;

Frequently Asked Questions

What is the EpollDatagramUnicastTest class?
EpollDatagramUnicastTest is a class in the netty codebase, defined in transport-native-epoll/src/test/java/io/netty/channel/epoll/EpollDatagramUnicastTest.java.
Where is EpollDatagramUnicastTest defined?
EpollDatagramUnicastTest is defined in transport-native-epoll/src/test/java/io/netty/channel/epoll/EpollDatagramUnicastTest.java at line 45.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free