@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); NioSocketChannelIoConnector connector = new NioSocketChannelIoConnector(sessionConfig); assertEquals("tcp", connector.getTransportMetadata().getName()); }
@Override public TransportMetadata getTransportMetadata() { return NIO_SOCKET_TRANSPORT_METADATA; }
NioSocketChannelIoConnector extends SocketChannelIoConnector { @Override public TransportMetadata getTransportMetadata() { return NIO_SOCKET_TRANSPORT_METADATA; } }
NioSocketChannelIoConnector extends SocketChannelIoConnector { @Override public TransportMetadata getTransportMetadata() { return NIO_SOCKET_TRANSPORT_METADATA; } NioSocketChannelIoConnector(NioSocketChannelIoSessionConfig sessionConfig);  NioSocketChannelIoConnector(NioSocketChannelIoSessionConfig sessionConfig,
            NioClientSocketChannelFactory channelFactory); }
NioSocketChannelIoConnector extends SocketChannelIoConnector { @Override public TransportMetadata getTransportMetadata() { return NIO_SOCKET_TRANSPORT_METADATA; } NioSocketChannelIoConnector(NioSocketChannelIoSessionConfig sessionConfig);  NioSocketChannelIoConnector(NioSocketChannelIoSessionConfig sessionConfig,
            NioClientSocketChannelFactory channelFactory); @Override TransportMetadata getTransportMetadata(); }
NioSocketChannelIoConnector extends SocketChannelIoConnector { @Override public TransportMetadata getTransportMetadata() { return NIO_SOCKET_TRANSPORT_METADATA; } NioSocketChannelIoConnector(NioSocketChannelIoSessionConfig sessionConfig);  NioSocketChannelIoConnector(NioSocketChannelIoSessionConfig sessionConfig,
            NioClientSocketChannelFactory channelFactory); @Override TransportMetadata getTransportMetadata();  }