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_BUFFERS
DEFAULT_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)
Set the idle timeout, in seconds.
|
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, isUsePooledBuffers
getReceiveBufferSize, getSendBufferSize, getTrafficClass, isReuseAddress
public 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)
NetworkOptions
setSendBufferSize
in class NetworkOptions
sendBufferSize
- the buffers size, in bytespublic NetServerOptions setReceiveBufferSize(int receiveBufferSize)
NetworkOptions
setReceiveBufferSize
in class NetworkOptions
receiveBufferSize
- the buffers size, in bytespublic NetServerOptions setReuseAddress(boolean reuseAddress)
NetworkOptions
setReuseAddress
in class NetworkOptions
reuseAddress
- the value of reuse addresspublic NetServerOptions setTrafficClass(int trafficClass)
NetworkOptions
setTrafficClass
in class NetworkOptions
trafficClass
- the value of traffic classpublic NetServerOptions setTcpNoDelay(boolean tcpNoDelay)
TCPSSLOptions
setTcpNoDelay
in class TCPSSLOptions
tcpNoDelay
- true if TCP no delay is enabled (Nagle disabled)public NetServerOptions setTcpKeepAlive(boolean tcpKeepAlive)
TCPSSLOptions
setTcpKeepAlive
in class TCPSSLOptions
tcpKeepAlive
- true if TCP keep alive is enabledpublic NetServerOptions setSoLinger(int soLinger)
TCPSSLOptions
setSoLinger
in class TCPSSLOptions
soLinger
- true if SO_linger is enabledpublic NetServerOptions setUsePooledBuffers(boolean usePooledBuffers)
TCPSSLOptions
setUsePooledBuffers
in class TCPSSLOptions
usePooledBuffers
- true if pooled buffers enabledpublic NetServerOptions setIdleTimeout(int idleTimeout)
TCPSSLOptions
setIdleTimeout
in class TCPSSLOptions
idleTimeout
- the timeout, in secondspublic NetServerOptions setSsl(boolean ssl)
TCPSSLOptions
setSsl
in class TCPSSLOptions
ssl
- true if enabledpublic NetServerOptions setKeyStoreOptions(JksOptions options)
TCPSSLOptions
setKeyStoreOptions
in class TCPSSLOptions
options
- the key store in jks formatpublic NetServerOptions setPfxKeyCertOptions(PfxOptions options)
TCPSSLOptions
setPfxKeyCertOptions
in class TCPSSLOptions
options
- the key cert options in pfx formatpublic NetServerOptions setPemKeyCertOptions(PemKeyCertOptions options)
TCPSSLOptions
setPemKeyCertOptions
in class TCPSSLOptions
options
- the options in pem formatpublic NetServerOptions setTrustStoreOptions(JksOptions options)
TCPSSLOptions
setTrustStoreOptions
in class TCPSSLOptions
options
- the options in jks formatpublic NetServerOptions setPfxTrustOptions(PfxOptions options)
TCPSSLOptions
setPfxTrustOptions
in class TCPSSLOptions
options
- the options in pfx formatpublic NetServerOptions setPemTrustOptions(PemTrustOptions options)
TCPSSLOptions
setPemTrustOptions
in class TCPSSLOptions
options
- the options in pem formatpublic NetServerOptions addEnabledCipherSuite(String suite)
TCPSSLOptions
addEnabledCipherSuite
in class TCPSSLOptions
suite
- the suitepublic NetServerOptions addCrlPath(String crlPath) throws NullPointerException
TCPSSLOptions
addCrlPath
in class TCPSSLOptions
crlPath
- the pathNullPointerException
public NetServerOptions addCrlValue(Buffer crlValue) throws NullPointerException
TCPSSLOptions
addCrlValue
in class TCPSSLOptions
crlValue
- the valueNullPointerException
public 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 TCPSSLOptions
public int hashCode()
hashCode
in class TCPSSLOptions
Copyright © 2015. All Rights Reserved.