public class NetServerOptions extends TCPSSLOptions
NetServer.| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_ACCEPT_BACKLOG
The default accept backlog = 1024
|
static boolean |
DEFAULT_CLIENT_AUTH_REQUIRED
Default value of whether client auth is required (SSL/TLS) = false
|
static String |
DEFAULT_HOST
The default host to listen on = "0.0.0.0" (meaning listen on all available interfaces).
|
static int |
DEFAULT_PORT
The default port to listen on = 0 (meaning a random ephemeral free port will be chosen)
|
DEFAULT_IDLE_TIMEOUT, DEFAULT_SO_LINGER, DEFAULT_SSL, DEFAULT_TCP_KEEP_ALIVE, DEFAULT_TCP_NO_DELAY, DEFAULT_USE_POOLED_BUFFERSDEFAULT_RECEIVE_BUFFER_SIZE, DEFAULT_REUSE_ADDRESS, DEFAULT_SEND_BUFFER_SIZE, DEFAULT_TRAFFIC_CLASS| Constructor and Description |
|---|
NetServerOptions()
Default constructor
|
NetServerOptions(JsonObject json)
Create some options from JSON
|
NetServerOptions(NetServerOptions other)
Copy constructor
|
| Modifier and Type | Method and Description |
|---|---|
NetServerOptions |
addCrlPath(String crlPath)
Add a CRL path
|
NetServerOptions |
addCrlValue(Buffer crlValue)
Add a CRL value
|
NetServerOptions |
addEnabledCipherSuite(String suite)
Add an enabled cipher suite
|
boolean |
equals(Object o) |
int |
getAcceptBacklog() |
String |
getHost() |
int |
getPort() |
int |
hashCode() |
boolean |
isClientAuthRequired() |
NetServerOptions |
setAcceptBacklog(int acceptBacklog)
Set the accept back log
|
NetServerOptions |
setClientAuthRequired(boolean clientAuthRequired)
Set whether client auth is required
|
NetServerOptions |
setHost(String host)
Set the host
|
NetServerOptions |
setIdleTimeout(int idleTimeout) |
NetServerOptions |
setKeyStoreOptions(JksOptions options)
Set the key/cert options in jks format, aka Java keystore.
|
NetServerOptions |
setPemKeyCertOptions(PemKeyCertOptions options)
Set the key/cert store options in pem format.
|
NetServerOptions |
setPemTrustOptions(PemTrustOptions options)
Set the trust options in pem format
|
NetServerOptions |
setPfxKeyCertOptions(PfxOptions options)
Set the key/cert options in pfx format.
|
NetServerOptions |
setPfxTrustOptions(PfxOptions options)
Set the trust options in pfx format
|
NetServerOptions |
setPort(int port)
Set the port
|
NetServerOptions |
setReceiveBufferSize(int receiveBufferSize)
Set the TCP receive buffer size
|
NetServerOptions |
setReuseAddress(boolean reuseAddress)
Set the value of reuse address
|
NetServerOptions |
setSendBufferSize(int sendBufferSize)
Set the TCP send buffer size
|
NetServerOptions |
setSoLinger(int soLinger)
Set whether SO_linger keep alive is enabled
|
NetServerOptions |
setSsl(boolean ssl)
Set whether SSL/TLS is enabled
|
NetServerOptions |
setTcpKeepAlive(boolean tcpKeepAlive)
Set whether TCP keep alive is enabled
|
NetServerOptions |
setTcpNoDelay(boolean tcpNoDelay)
Set whether TCP no delay is enabled
|
NetServerOptions |
setTrafficClass(int trafficClass)
Set the value of traffic class
|
NetServerOptions |
setTrustStoreOptions(JksOptions options)
Set the trust options in jks format, aka Java trustore
|
NetServerOptions |
setUsePooledBuffers(boolean usePooledBuffers)
Set whether Netty pooled buffers are enabled
|
getCrlPaths, getCrlValues, getEnabledCipherSuites, getIdleTimeout, getKeyCertOptions, getSoLinger, getTrustOptions, isSsl, isTcpKeepAlive, isTcpNoDelay, isUsePooledBuffersgetReceiveBufferSize, getSendBufferSize, getTrafficClass, isReuseAddresspublic static final int DEFAULT_PORT
public static final String DEFAULT_HOST
public static final int DEFAULT_ACCEPT_BACKLOG
public static final boolean DEFAULT_CLIENT_AUTH_REQUIRED
public NetServerOptions()
public NetServerOptions(NetServerOptions other)
other - the options to copypublic NetServerOptions(JsonObject json)
json - the JSONpublic NetServerOptions setSendBufferSize(int sendBufferSize)
NetworkOptionssetSendBufferSize in class NetworkOptionssendBufferSize - the buffers size, in bytespublic NetServerOptions setReceiveBufferSize(int receiveBufferSize)
NetworkOptionssetReceiveBufferSize in class NetworkOptionsreceiveBufferSize - the buffers size, in bytespublic NetServerOptions setReuseAddress(boolean reuseAddress)
NetworkOptionssetReuseAddress in class NetworkOptionsreuseAddress - the value of reuse addresspublic NetServerOptions setTrafficClass(int trafficClass)
NetworkOptionssetTrafficClass in class NetworkOptionstrafficClass - the value of traffic classpublic NetServerOptions setTcpNoDelay(boolean tcpNoDelay)
TCPSSLOptionssetTcpNoDelay in class TCPSSLOptionstcpNoDelay - true if TCP no delay is enabled (Nagle disabled)public NetServerOptions setTcpKeepAlive(boolean tcpKeepAlive)
TCPSSLOptionssetTcpKeepAlive in class TCPSSLOptionstcpKeepAlive - true if TCP keep alive is enabledpublic NetServerOptions setSoLinger(int soLinger)
TCPSSLOptionssetSoLinger in class TCPSSLOptionssoLinger - true if SO_linger is enabledpublic NetServerOptions setUsePooledBuffers(boolean usePooledBuffers)
TCPSSLOptionssetUsePooledBuffers in class TCPSSLOptionsusePooledBuffers - true if pooled buffers enabledpublic NetServerOptions setIdleTimeout(int idleTimeout)
setIdleTimeout in class TCPSSLOptionspublic NetServerOptions setSsl(boolean ssl)
TCPSSLOptionssetSsl in class TCPSSLOptionsssl - true if enabledpublic NetServerOptions setKeyStoreOptions(JksOptions options)
TCPSSLOptionssetKeyStoreOptions in class TCPSSLOptionsoptions - the key store in jks formatpublic NetServerOptions setPfxKeyCertOptions(PfxOptions options)
TCPSSLOptionssetPfxKeyCertOptions in class TCPSSLOptionsoptions - the key cert options in pfx formatpublic NetServerOptions setPemKeyCertOptions(PemKeyCertOptions options)
TCPSSLOptionssetPemKeyCertOptions in class TCPSSLOptionsoptions - the options in pem formatpublic NetServerOptions setTrustStoreOptions(JksOptions options)
TCPSSLOptionssetTrustStoreOptions in class TCPSSLOptionsoptions - the options in jks formatpublic NetServerOptions setPfxTrustOptions(PfxOptions options)
TCPSSLOptionssetPfxTrustOptions in class TCPSSLOptionsoptions - the options in pfx formatpublic NetServerOptions setPemTrustOptions(PemTrustOptions options)
TCPSSLOptionssetPemTrustOptions in class TCPSSLOptionsoptions - the options in pem formatpublic NetServerOptions addEnabledCipherSuite(String suite)
TCPSSLOptionsaddEnabledCipherSuite in class TCPSSLOptionssuite - the suitepublic NetServerOptions addCrlPath(String crlPath) throws NullPointerException
TCPSSLOptionsaddCrlPath in class TCPSSLOptionscrlPath - the pathNullPointerExceptionpublic NetServerOptions addCrlValue(Buffer crlValue) throws NullPointerException
TCPSSLOptionsaddCrlValue in class TCPSSLOptionscrlValue - the valueNullPointerExceptionpublic int getAcceptBacklog()
public NetServerOptions setAcceptBacklog(int acceptBacklog)
acceptBacklog - accept backlogpublic int getPort()
public NetServerOptions setPort(int port)
port - the portpublic String getHost()
public NetServerOptions setHost(String host)
host - the hostpublic boolean isClientAuthRequired()
public NetServerOptions setClientAuthRequired(boolean clientAuthRequired)
clientAuthRequired - true if client auth is requiredpublic boolean equals(Object o)
equals in class TCPSSLOptionspublic int hashCode()
hashCode in class TCPSSLOptionsCopyright © 2015. All Rights Reserved.