NioUdtProviderTest.java — netty Source File
Architecture documentation for NioUdtProviderTest.java, a java file in the netty codebase.
Entity Profile
Relationship Graph
Source Code
/*
* Copyright 2012 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.test.udt.nio;
import io.netty.channel.udt.UdtServerChannel;
import io.netty.channel.udt.nio.NioUdtByteAcceptorChannel;
import io.netty.channel.udt.nio.NioUdtByteConnectorChannel;
import io.netty.channel.udt.nio.NioUdtByteRendezvousChannel;
import io.netty.channel.udt.nio.NioUdtProvider;
import io.netty.channel.udt.nio.NioUdtMessageAcceptorChannel;
import io.netty.channel.udt.nio.NioUdtMessageConnectorChannel;
import io.netty.channel.udt.nio.NioUdtMessageRendezvousChannel;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertInstanceOf;
import static org.junit.jupiter.api.Assertions.assertNotNull;
public class NioUdtProviderTest extends AbstractUdtTest {
/**
* verify factory
*/
@Test
public void provideFactory() {
NioUdtByteAcceptorChannel nioUdtByteAcceptorChannel
= (NioUdtByteAcceptorChannel) NioUdtProvider.BYTE_ACCEPTOR.newChannel();
NioUdtByteConnectorChannel nioUdtByteConnectorChannel
= (NioUdtByteConnectorChannel) NioUdtProvider.BYTE_CONNECTOR.newChannel();
NioUdtByteRendezvousChannel nioUdtByteRendezvousChannel
= (NioUdtByteRendezvousChannel) NioUdtProvider.BYTE_RENDEZVOUS.newChannel();
NioUdtMessageAcceptorChannel nioUdtMessageAcceptorChannel
= (NioUdtMessageAcceptorChannel) NioUdtProvider.MESSAGE_ACCEPTOR.newChannel();
NioUdtMessageConnectorChannel nioUdtMessageConnectorChannel
= (NioUdtMessageConnectorChannel) NioUdtProvider.MESSAGE_CONNECTOR.newChannel();
NioUdtMessageRendezvousChannel nioUdtMessageRendezvousChannel
= (NioUdtMessageRendezvousChannel) NioUdtProvider.MESSAGE_RENDEZVOUS.newChannel();
// bytes
assertNotNull(nioUdtByteAcceptorChannel);
assertNotNull(nioUdtByteConnectorChannel);
assertNotNull(nioUdtByteRendezvousChannel);
// message
assertNotNull(nioUdtMessageAcceptorChannel);
assertNotNull(nioUdtMessageConnectorChannel);
assertNotNull(nioUdtMessageRendezvousChannel);
// channel
assertNotNull(NioUdtProvider.channelUDT(nioUdtByteAcceptorChannel));
assertNotNull(NioUdtProvider.channelUDT(nioUdtByteConnectorChannel));
assertNotNull(NioUdtProvider.channelUDT(nioUdtByteRendezvousChannel));
assertNotNull(NioUdtProvider.channelUDT(nioUdtMessageAcceptorChannel));
assertNotNull(NioUdtProvider.channelUDT(nioUdtMessageConnectorChannel));
assertNotNull(NioUdtProvider.channelUDT(nioUdtMessageRendezvousChannel));
// acceptor types
assertInstanceOf(UdtServerChannel.class, NioUdtProvider.BYTE_ACCEPTOR.newChannel());
assertInstanceOf(UdtServerChannel.class, NioUdtProvider.MESSAGE_ACCEPTOR.newChannel());
}
}
Domain
Subdomains
Classes
Source
Frequently Asked Questions
What does NioUdtProviderTest.java do?
NioUdtProviderTest.java is a source file in the netty codebase, written in java. It belongs to the Buffer domain, Search subdomain.
Where is NioUdtProviderTest.java in the architecture?
NioUdtProviderTest.java is located at transport-udt/src/test/java/io/netty/test/udt/nio/NioUdtProviderTest.java (domain: Buffer, subdomain: Search, directory: transport-udt/src/test/java/io/netty/test/udt/nio).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free