@Test public void testClone() { TransportOptions options = createNonDefaultOptions().clone(); assertEquals(TEST_SEND_BUFFER_SIZE, options.getSendBufferSize()); assertEquals(TEST_RECEIVE_BUFFER_SIZE, options.getReceiveBufferSize()); assertEquals(TEST_TRAFFIC_CLASS, options.getTrafficClass()); assertEquals(TEST_TCP_NO_DELAY, options.isTcpNoDelay()); assertEquals(TEST_TCP_KEEP_ALIVE, options.isTcpKeepAlive()); assertEquals(TEST_SO_LINGER, options.getSoLinger()); assertEquals(TEST_SO_TIMEOUT, options.getSoTimeout()); assertEquals(TEST_CONNECT_TIMEOUT, options.getConnectTimeout()); assertEquals(TEST_DEFAULT_TCP_PORT, options.getDefaultTcpPort()); assertEquals(TEST_DEFAULT_SSL_PORT, options.getDefaultSslPort()); assertEquals(TEST_USE_EPOLL_VALUE, options.isUseEpoll()); assertEquals(TEST_TRACE_BYTES_VALUE, options.isTraceBytes()); assertEquals(CLIENT_KEYSTORE, options.getKeyStoreLocation()); assertEquals(PASSWORD, options.getKeyStorePassword()); assertEquals(CLIENT_TRUSTSTORE, options.getTrustStoreLocation()); assertEquals(PASSWORD, options.getTrustStorePassword()); assertEquals(KEYSTORE_TYPE, options.getKeyStoreType()); assertEquals(KEYSTORE_TYPE, options.getTrustStoreType()); assertEquals(KEY_ALIAS, options.getKeyAlias()); assertEquals(CONTEXT_PROTOCOL, options.getContextProtocol()); assertEquals(LOCAL_ADDRESS,options.getLocalAddress()); assertEquals(LOCAL_PORT,options.getLocalPort()); assertEquals(SSL_CONTEXT, options.getSslContextOverride()); assertEquals(PROXY_HANDLER_SUPPLIER, options.getProxyHandlerSupplier()); assertArrayEquals(ENABLED_PROTOCOLS,options.getEnabledProtocols()); assertArrayEquals(DISABLED_PROTOCOLS,options.getDisabledProtocols()); assertArrayEquals(ENABLED_CIPHERS,options.getEnabledCipherSuites()); assertArrayEquals(DISABLED_CIPHERS,options.getDisabledCipherSuites()); }
@Override public TransportOptions clone() { return copyOptions(new TransportOptions()); }
TransportOptions implements Cloneable { @Override public TransportOptions clone() { return copyOptions(new TransportOptions()); } }
TransportOptions implements Cloneable { @Override public TransportOptions clone() { return copyOptions(new TransportOptions()); } TransportOptions(); }
TransportOptions implements Cloneable { @Override public TransportOptions clone() { return copyOptions(new TransportOptions()); } TransportOptions(); @Override TransportOptions clone(); int getSendBufferSize(); void setSendBufferSize(int sendBufferSize); int getReceiveBufferSize(); void setReceiveBufferSize(int receiveBufferSize); int getTrafficClass(); void setTrafficClass(int trafficClass); int getSoTimeout(); void setSoTimeout(int soTimeout); boolean isTcpNoDelay(); void setTcpNoDelay(boolean tcpNoDelay); int getSoLinger(); void setSoLinger(int soLinger); boolean isTcpKeepAlive(); void setTcpKeepAlive(boolean keepAlive); int getConnectTimeout(); void setConnectTimeout(int connectTimeout); int getDefaultTcpPort(); void setDefaultTcpPort(int defaultTcpPort); String getLocalAddress(); void setLocalAddress(String localAddress); int getLocalPort(); void setLocalPort(int localPort); boolean isUseEpoll(); void setUseEpoll(boolean useEpoll); boolean isUseKQueue(); void setUseKQueue(boolean useKQueue); boolean isTraceBytes(); void setTraceBytes(boolean traceBytes); String getKeyStoreLocation(); void setKeyStoreLocation(String keyStoreLocation); String getKeyStorePassword(); void setKeyStorePassword(String keyStorePassword); String getTrustStoreLocation(); void setTrustStoreLocation(String trustStoreLocation); String getTrustStorePassword(); void setTrustStorePassword(String trustStorePassword); void setStoreType(String storeType); String getKeyStoreType(); void setKeyStoreType(String keyStoreType); String getTrustStoreType(); void setTrustStoreType(String trustStoreType); String[] getEnabledCipherSuites(); void setEnabledCipherSuites(String[] enabledCipherSuites); String[] getDisabledCipherSuites(); void setDisabledCipherSuites(String[] disabledCipherSuites); String[] getEnabledProtocols(); void setEnabledProtocols(String[] enabledProtocols); String[] getDisabledProtocols(); void setDisabledProtocols(String[] disabledProtocols); String getContextProtocol(); void setContextProtocol(String contextProtocol); boolean isTrustAll(); void setTrustAll(boolean trustAll); boolean isVerifyHost(); void setVerifyHost(boolean verifyHost); String getKeyAlias(); void setKeyAlias(String keyAlias); int getDefaultSslPort(); void setDefaultSslPort(int defaultSslPort); void setSslContextOverride(SSLContext sslContextOverride); SSLContext getSslContextOverride(); @SuppressWarnings("unchecked") Supplier<T> getProxyHandlerSupplier(); void setProxyHandlerSupplier(Supplier<T> proxyHandlerFactory); Map<String, String> getHttpHeaders(); boolean isUseOpenSSL(); void setUseOpenSSL(boolean useOpenSSL); }
TransportOptions implements Cloneable { @Override public TransportOptions clone() { return copyOptions(new TransportOptions()); } TransportOptions(); @Override TransportOptions clone(); int getSendBufferSize(); void setSendBufferSize(int sendBufferSize); int getReceiveBufferSize(); void setReceiveBufferSize(int receiveBufferSize); int getTrafficClass(); void setTrafficClass(int trafficClass); int getSoTimeout(); void setSoTimeout(int soTimeout); boolean isTcpNoDelay(); void setTcpNoDelay(boolean tcpNoDelay); int getSoLinger(); void setSoLinger(int soLinger); boolean isTcpKeepAlive(); void setTcpKeepAlive(boolean keepAlive); int getConnectTimeout(); void setConnectTimeout(int connectTimeout); int getDefaultTcpPort(); void setDefaultTcpPort(int defaultTcpPort); String getLocalAddress(); void setLocalAddress(String localAddress); int getLocalPort(); void setLocalPort(int localPort); boolean isUseEpoll(); void setUseEpoll(boolean useEpoll); boolean isUseKQueue(); void setUseKQueue(boolean useKQueue); boolean isTraceBytes(); void setTraceBytes(boolean traceBytes); String getKeyStoreLocation(); void setKeyStoreLocation(String keyStoreLocation); String getKeyStorePassword(); void setKeyStorePassword(String keyStorePassword); String getTrustStoreLocation(); void setTrustStoreLocation(String trustStoreLocation); String getTrustStorePassword(); void setTrustStorePassword(String trustStorePassword); void setStoreType(String storeType); String getKeyStoreType(); void setKeyStoreType(String keyStoreType); String getTrustStoreType(); void setTrustStoreType(String trustStoreType); String[] getEnabledCipherSuites(); void setEnabledCipherSuites(String[] enabledCipherSuites); String[] getDisabledCipherSuites(); void setDisabledCipherSuites(String[] disabledCipherSuites); String[] getEnabledProtocols(); void setEnabledProtocols(String[] enabledProtocols); String[] getDisabledProtocols(); void setDisabledProtocols(String[] disabledProtocols); String getContextProtocol(); void setContextProtocol(String contextProtocol); boolean isTrustAll(); void setTrustAll(boolean trustAll); boolean isVerifyHost(); void setVerifyHost(boolean verifyHost); String getKeyAlias(); void setKeyAlias(String keyAlias); int getDefaultSslPort(); void setDefaultSslPort(int defaultSslPort); void setSslContextOverride(SSLContext sslContextOverride); SSLContext getSslContextOverride(); @SuppressWarnings("unchecked") Supplier<T> getProxyHandlerSupplier(); void setProxyHandlerSupplier(Supplier<T> proxyHandlerFactory); Map<String, String> getHttpHeaders(); boolean isUseOpenSSL(); void setUseOpenSSL(boolean useOpenSSL); static final int DEFAULT_SEND_BUFFER_SIZE; static final int DEFAULT_RECEIVE_BUFFER_SIZE; static final int DEFAULT_TRAFFIC_CLASS; static final boolean DEFAULT_TCP_NO_DELAY; static final boolean DEFAULT_TCP_KEEP_ALIVE; static final int DEFAULT_SO_LINGER; static final int DEFAULT_SO_TIMEOUT; static final int DEFAULT_CONNECT_TIMEOUT; static final int DEFAULT_TCP_PORT; static final boolean DEFAULT_USE_EPOLL; static final boolean DEFAULT_USE_KQUEUE; static final boolean DEFAULT_TRACE_BYTES; static final String DEFAULT_STORE_TYPE; static final String DEFAULT_CONTEXT_PROTOCOL; static final boolean DEFAULT_TRUST_ALL; static final boolean DEFAULT_VERIFY_HOST; static final List<String> DEFAULT_DISABLED_PROTOCOLS; static final int DEFAULT_SSL_PORT; static final boolean DEFAULT_USE_OPENSSL; static final int DEFAULT_LOCAL_PORT; }