public abstract class TCPSSLOptions extends NetworkOptions
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_IDLE_TIMEOUT
Default idle timeout = 0
|
static int |
DEFAULT_SO_LINGER
The default value of SO_linger = -1
|
static boolean |
DEFAULT_SSL
SSL enable by default = false
|
static SSLEngineOptions |
DEFAULT_SSL_ENGINE
The default SSL engine options = null (autoguess)
|
static boolean |
DEFAULT_TCP_KEEP_ALIVE
The default value of TCP keep alive = false
|
static boolean |
DEFAULT_TCP_NO_DELAY
The default value of TCP-no-delay = true (Nagle disabled)
|
static boolean |
DEFAULT_USE_ALPN
Default use alpn = false
|
static boolean |
DEFAULT_USE_POOLED_BUFFERS
The default value of Netty use pooled buffers = false
|
DEFAULT_LOG_ENABLED, DEFAULT_RECEIVE_BUFFER_SIZE, DEFAULT_REUSE_ADDRESS, DEFAULT_SEND_BUFFER_SIZE, DEFAULT_TRAFFIC_CLASS
Constructor and Description |
---|
TCPSSLOptions()
Default constructor
|
TCPSSLOptions(JsonObject json)
Create options from JSON
|
TCPSSLOptions(TCPSSLOptions other)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
TCPSSLOptions |
addCrlPath(String crlPath)
Add a CRL path
|
TCPSSLOptions |
addCrlValue(Buffer crlValue)
Add a CRL value
|
TCPSSLOptions |
addEnabledCipherSuite(String suite)
Add an enabled cipher suite
|
TCPSSLOptions |
addEnabledSecureTransportProtocol(String protocol)
Add an enabled SSL/TLS protocols
|
boolean |
equals(Object o) |
List<String> |
getCrlPaths() |
List<Buffer> |
getCrlValues()
Get the CRL values
|
Set<String> |
getEnabledCipherSuites() |
Set<String> |
getEnabledSecureTransportProtocols()
Returns the enabled SSL/TLS protocols
|
int |
getIdleTimeout() |
KeyCertOptions |
getKeyCertOptions() |
int |
getSoLinger() |
SSLEngineOptions |
getSslEngineOptions() |
TrustOptions |
getTrustOptions() |
int |
hashCode() |
boolean |
isSsl() |
boolean |
isTcpKeepAlive() |
boolean |
isTcpNoDelay() |
boolean |
isUseAlpn() |
boolean |
isUsePooledBuffers() |
TCPSSLOptions |
setIdleTimeout(int idleTimeout)
Set the idle timeout, in seconds.
|
TCPSSLOptions |
setJdkSslEngineOptions(JdkSSLEngineOptions sslEngineOptions) |
TCPSSLOptions |
setKeyCertOptions(KeyCertOptions options)
Set the key/cert options.
|
TCPSSLOptions |
setKeyStoreOptions(JksOptions options)
Set the key/cert options in jks format, aka Java keystore.
|
TCPSSLOptions |
setLogActivity(boolean logEnabled)
Set to true to enabled network activity logging: Netty's pipeline is configured for logging on Netty's logger.
|
TCPSSLOptions |
setOpenSslEngineOptions(OpenSSLEngineOptions sslEngineOptions) |
TCPSSLOptions |
setPemKeyCertOptions(PemKeyCertOptions options)
Set the key/cert store options in pem format.
|
TCPSSLOptions |
setPemTrustOptions(PemTrustOptions options)
Set the trust options in pem format
|
TCPSSLOptions |
setPfxKeyCertOptions(PfxOptions options)
Set the key/cert options in pfx format.
|
TCPSSLOptions |
setPfxTrustOptions(PfxOptions options)
Set the trust options in pfx format
|
TCPSSLOptions |
setSoLinger(int soLinger)
Set whether SO_linger keep alive is enabled
|
TCPSSLOptions |
setSsl(boolean ssl)
Set whether SSL/TLS is enabled
|
TCPSSLOptions |
setSslEngineOptions(SSLEngineOptions sslEngineOptions)
Set to use SSL engine implementation to use.
|
TCPSSLOptions |
setTcpKeepAlive(boolean tcpKeepAlive)
Set whether TCP keep alive is enabled
|
TCPSSLOptions |
setTcpNoDelay(boolean tcpNoDelay)
Set whether TCP no delay is enabled
|
TCPSSLOptions |
setTrustOptions(TrustOptions options)
Set the trust options.
|
TCPSSLOptions |
setTrustStoreOptions(JksOptions options)
Set the trust options in jks format, aka Java trustore
|
TCPSSLOptions |
setUseAlpn(boolean useAlpn)
Set the ALPN usage.
|
TCPSSLOptions |
setUsePooledBuffers(boolean usePooledBuffers)
Set whether Netty pooled buffers are enabled
|
getLogActivity, getReceiveBufferSize, getSendBufferSize, getTrafficClass, isReuseAddress, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setTrafficClass
public static final boolean DEFAULT_TCP_NO_DELAY
public static final boolean DEFAULT_TCP_KEEP_ALIVE
public static final int DEFAULT_SO_LINGER
public static final boolean DEFAULT_USE_POOLED_BUFFERS
public static final boolean DEFAULT_SSL
public static final int DEFAULT_IDLE_TIMEOUT
public static final boolean DEFAULT_USE_ALPN
public static final SSLEngineOptions DEFAULT_SSL_ENGINE
public TCPSSLOptions()
public TCPSSLOptions(TCPSSLOptions other)
other
- the options to copypublic TCPSSLOptions(JsonObject json)
json
- the JSONpublic boolean isTcpNoDelay()
public TCPSSLOptions setTcpNoDelay(boolean tcpNoDelay)
tcpNoDelay
- true if TCP no delay is enabled (Nagle disabled)public boolean isTcpKeepAlive()
public TCPSSLOptions setTcpKeepAlive(boolean tcpKeepAlive)
tcpKeepAlive
- true if TCP keep alive is enabledpublic int getSoLinger()
public TCPSSLOptions setSoLinger(int soLinger)
soLinger
- true if SO_linger is enabledpublic boolean isUsePooledBuffers()
public TCPSSLOptions setUsePooledBuffers(boolean usePooledBuffers)
usePooledBuffers
- true if pooled buffers enabledpublic TCPSSLOptions setIdleTimeout(int idleTimeout)
idleTimeout
- the timeout, in secondspublic int getIdleTimeout()
public boolean isSsl()
public TCPSSLOptions setSsl(boolean ssl)
ssl
- true if enabledpublic KeyCertOptions getKeyCertOptions()
public TCPSSLOptions setKeyCertOptions(KeyCertOptions options)
options
- the key store optionspublic TCPSSLOptions setKeyStoreOptions(JksOptions options)
options
- the key store in jks formatpublic TCPSSLOptions setPfxKeyCertOptions(PfxOptions options)
options
- the key cert options in pfx formatpublic TCPSSLOptions setPemKeyCertOptions(PemKeyCertOptions options)
options
- the options in pem formatpublic TrustOptions getTrustOptions()
public TCPSSLOptions setTrustOptions(TrustOptions options)
options
- the trust optionspublic TCPSSLOptions setTrustStoreOptions(JksOptions options)
options
- the trust options in jks formatpublic TCPSSLOptions setPfxTrustOptions(PfxOptions options)
options
- the trust options in pfx formatpublic TCPSSLOptions setPemTrustOptions(PemTrustOptions options)
options
- the trust options in pem formatpublic TCPSSLOptions addEnabledCipherSuite(String suite)
suite
- the suitepublic Set<String> getEnabledCipherSuites()
public TCPSSLOptions addCrlPath(String crlPath) throws NullPointerException
crlPath
- the pathNullPointerException
public TCPSSLOptions addCrlValue(Buffer crlValue) throws NullPointerException
crlValue
- the valueNullPointerException
public boolean isUseAlpn()
public TCPSSLOptions setUseAlpn(boolean useAlpn)
useAlpn
- true when Application-Layer Protocol Negotiation should be usedpublic SSLEngineOptions getSslEngineOptions()
public TCPSSLOptions setSslEngineOptions(SSLEngineOptions sslEngineOptions)
sslEngineOptions
- the ssl engine to usepublic TCPSSLOptions setJdkSslEngineOptions(JdkSSLEngineOptions sslEngineOptions)
public TCPSSLOptions setOpenSslEngineOptions(OpenSSLEngineOptions sslEngineOptions)
public TCPSSLOptions addEnabledSecureTransportProtocol(String protocol)
protocol
- the SSL/TLS protocol do enabledpublic Set<String> getEnabledSecureTransportProtocols()
public TCPSSLOptions setLogActivity(boolean logEnabled)
NetworkOptions
setLogActivity
in class NetworkOptions
logEnabled
- true for logging the network activitypublic boolean equals(Object o)
equals
in class NetworkOptions
public int hashCode()
hashCode
in class NetworkOptions
Copyright © 2016. All rights reserved.