@Test public void transportNameShouldBeTcp() throws Exception { final NioSocketChannelConfig socketConfig = context.mock(NioSocketChannelConfig.class, "socketConfig"); context.checking(new Expectations() { { allowing(socketConfig).setOption(with(any(String.class)), with(any(int.class))); allowing(socketConfig).setOption(with(any(String.class)), with(any(boolean.class))); allowing(socketConfig).setReuseAddress(with(any(boolean.class))); } }); NioSocketChannelIoSessionConfig sessionConfig = new NioSocketChannelIoSessionConfig(socketConfig); NioServerSocketChannelFactory serverChannelFactory = new NioServerSocketChannelFactory(); NioSocketChannelIoAcceptor acceptor = new NioSocketChannelIoAcceptor(sessionConfig, serverChannelFactory); assertEquals("tcp", acceptor.getTransportMetadata().getName()); }
@Override public TransportMetadata getTransportMetadata() { return NIO_SOCKET_TRANSPORT_METADATA; }
NioSocketChannelIoAcceptor extends SocketChannelIoAcceptor { @Override public TransportMetadata getTransportMetadata() { return NIO_SOCKET_TRANSPORT_METADATA; } }
NioSocketChannelIoAcceptor extends SocketChannelIoAcceptor { @Override public TransportMetadata getTransportMetadata() { return NIO_SOCKET_TRANSPORT_METADATA; } NioSocketChannelIoAcceptor(NioSocketChannelIoSessionConfig sessionConfig);  NioSocketChannelIoAcceptor(NioSocketChannelIoSessionConfig sessionConfig,
            NioServerSocketChannelFactory channelFactory);  NioSocketChannelIoAcceptor(NioSocketChannelIoSessionConfig sessionConfig,
            final NioServerSocketChannelFactory channelFactory, ChannelHandler bindHandler); }
NioSocketChannelIoAcceptor extends SocketChannelIoAcceptor { @Override public TransportMetadata getTransportMetadata() { return NIO_SOCKET_TRANSPORT_METADATA; } NioSocketChannelIoAcceptor(NioSocketChannelIoSessionConfig sessionConfig);  NioSocketChannelIoAcceptor(NioSocketChannelIoSessionConfig sessionConfig,
            NioServerSocketChannelFactory channelFactory);  NioSocketChannelIoAcceptor(NioSocketChannelIoSessionConfig sessionConfig,
            final NioServerSocketChannelFactory channelFactory, ChannelHandler bindHandler); @Override TransportMetadata getTransportMetadata(); }
NioSocketChannelIoAcceptor extends SocketChannelIoAcceptor { @Override public TransportMetadata getTransportMetadata() { return NIO_SOCKET_TRANSPORT_METADATA; } NioSocketChannelIoAcceptor(NioSocketChannelIoSessionConfig sessionConfig);  NioSocketChannelIoAcceptor(NioSocketChannelIoSessionConfig sessionConfig,
            NioServerSocketChannelFactory channelFactory);  NioSocketChannelIoAcceptor(NioSocketChannelIoSessionConfig sessionConfig,
            final NioServerSocketChannelFactory channelFactory, ChannelHandler bindHandler); @Override TransportMetadata getTransportMetadata();  }