@Test public void testCreateWithDefaultOptions() throws Exception { URI BASE_URI = new URI("ssl: NettySslTransportFactory factory = new NettySslTransportFactory(); Transport transport = factory.createTransport(BASE_URI); assertNotNull(transport); assertTrue(transport instanceof NettyTcpTransport); assertFalse(transport.isConnected()); assertTrue(transport.isSecure()); TransportOptions options = transport.getTransportOptions(); assertNotNull(options); assertEquals(TransportOptions.DEFAULT_CONNECT_TIMEOUT, options.getConnectTimeout()); assertEquals(TransportOptions.DEFAULT_SEND_BUFFER_SIZE, options.getSendBufferSize()); assertEquals(TransportOptions.DEFAULT_RECEIVE_BUFFER_SIZE, options.getReceiveBufferSize()); assertEquals(TransportOptions.DEFAULT_TRAFFIC_CLASS, options.getTrafficClass()); assertEquals(TransportOptions.DEFAULT_TCP_NO_DELAY, options.isTcpNoDelay()); assertEquals(TransportOptions.DEFAULT_TCP_KEEP_ALIVE, options.isTcpKeepAlive()); assertEquals(TransportOptions.DEFAULT_SO_LINGER, options.getSoLinger()); assertEquals(TransportOptions.DEFAULT_SO_TIMEOUT, options.getSoTimeout()); assertNull(options.getLocalAddress()); assertEquals(TransportOptions.DEFAULT_LOCAL_PORT, options.getLocalPort()); assertEquals(TransportOptions.DEFAULT_CONTEXT_PROTOCOL, options.getContextProtocol()); assertNull(options.getEnabledProtocols()); assertArrayEquals(TransportOptions.DEFAULT_DISABLED_PROTOCOLS.toArray(new String[0]), options.getDisabledProtocols()); assertNull(options.getEnabledCipherSuites()); assertEquals(TransportOptions.DEFAULT_STORE_TYPE, options.getKeyStoreType()); assertEquals(TransportOptions.DEFAULT_STORE_TYPE, options.getTrustStoreType()); assertEquals(TransportOptions.DEFAULT_VERIFY_HOST, options.isVerifyHost()); assertNull(options.getKeyAlias()); }
@Override public boolean isSecure() { return true; }
NettySslTransportFactory extends NettyTcpTransportFactory { @Override public boolean isSecure() { return true; } }
NettySslTransportFactory extends NettyTcpTransportFactory { @Override public boolean isSecure() { return true; }  }
NettySslTransportFactory extends NettyTcpTransportFactory { @Override public boolean isSecure() { return true; }  @Override String getName(); @Override boolean isSecure(); }
NettySslTransportFactory extends NettyTcpTransportFactory { @Override public boolean isSecure() { return true; }  @Override String getName(); @Override boolean isSecure();  }