public class HttpServerOptions extends NetServerOptions
HttpServer
instanceModifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_COMPRESSION_SUPPORTED
Default value of whether compression is supported = false
|
static int |
DEFAULT_MAX_WEBSOCKET_FRAME_SIZE
Default max websocket framesize = 65536
|
static int |
DEFAULT_PORT
Default port the server will listen on = 80
|
DEFAULT_ACCEPT_BACKLOG, DEFAULT_CLIENT_AUTH_REQUIRED, DEFAULT_HOST
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 |
---|
HttpServerOptions()
Default constructor
|
HttpServerOptions(HttpServerOptions other)
Copy constructor
|
HttpServerOptions(JsonObject json)
Create an options from JSON
|
Modifier and Type | Method and Description |
---|---|
HttpServerOptions |
addCrlPath(String crlPath)
Add a CRL path
|
HttpServerOptions |
addCrlValue(Buffer crlValue)
Add a CRL value
|
HttpServerOptions |
addEnabledCipherSuite(String suite)
Add an enabled cipher suite
|
boolean |
equals(Object o) |
int |
getMaxWebsocketFrameSize() |
String |
getWebsocketSubProtocols() |
int |
hashCode() |
boolean |
isCompressionSupported() |
HttpServerOptions |
setAcceptBacklog(int acceptBacklog)
Set the accept back log
|
HttpServerOptions |
setClientAuthRequired(boolean clientAuthRequired)
Set whether client auth is required
|
HttpServerOptions |
setCompressionSupported(boolean compressionSupported)
Set whether the server supports compression
|
HttpServerOptions |
setHost(String host)
Set the host
|
HttpServerOptions |
setIdleTimeout(int idleTimeout)
Set the idle timeout, in seconds.
|
HttpServerOptions |
setKeyStoreOptions(JksOptions options)
Set the key/cert options in jks format, aka Java keystore.
|
HttpServerOptions |
setMaxWebsocketFrameSize(int maxWebsocketFrameSize)
Set the maximum websocket frames size
|
HttpServerOptions |
setPemKeyCertOptions(PemKeyCertOptions options)
Set the key/cert store options in pem format.
|
HttpServerOptions |
setPemTrustOptions(PemTrustOptions options)
Set the trust options in pem format
|
HttpServerOptions |
setPfxKeyCertOptions(PfxOptions options)
Set the key/cert options in pfx format.
|
HttpServerOptions |
setPfxTrustOptions(PfxOptions options)
Set the trust options in pfx format
|
HttpServerOptions |
setPort(int port)
Set the port
|
HttpServerOptions |
setReceiveBufferSize(int receiveBufferSize)
Set the TCP receive buffer size
|
HttpServerOptions |
setReuseAddress(boolean reuseAddress)
Set the value of reuse address
|
HttpServerOptions |
setSendBufferSize(int sendBufferSize)
Set the TCP send buffer size
|
HttpServerOptions |
setSoLinger(int soLinger)
Set whether SO_linger keep alive is enabled
|
HttpServerOptions |
setSsl(boolean ssl)
Set whether SSL/TLS is enabled
|
HttpServerOptions |
setTcpKeepAlive(boolean tcpKeepAlive)
Set whether TCP keep alive is enabled
|
HttpServerOptions |
setTcpNoDelay(boolean tcpNoDelay)
Set whether TCP no delay is enabled
|
HttpServerOptions |
setTrafficClass(int trafficClass)
Set the value of traffic class
|
HttpServerOptions |
setTrustStoreOptions(JksOptions options)
Set the trust options in jks format, aka Java trustore
|
HttpServerOptions |
setUsePooledBuffers(boolean usePooledBuffers)
Set whether Netty pooled buffers are enabled
|
HttpServerOptions |
setWebsocketSubProtocol(String subProtocols)
Set the websocket subprotocols supported by the server.
|
getAcceptBacklog, getHost, getPort, isClientAuthRequired
getCrlPaths, getCrlValues, getEnabledCipherSuites, getIdleTimeout, getKeyCertOptions, getSoLinger, getTrustOptions, isSsl, isTcpKeepAlive, isTcpNoDelay, isUsePooledBuffers
getReceiveBufferSize, getSendBufferSize, getTrafficClass, isReuseAddress
public static final int DEFAULT_PORT
public static final boolean DEFAULT_COMPRESSION_SUPPORTED
public static final int DEFAULT_MAX_WEBSOCKET_FRAME_SIZE
public HttpServerOptions()
public HttpServerOptions(HttpServerOptions other)
other
- the options to copypublic HttpServerOptions(JsonObject json)
json
- the JSONpublic HttpServerOptions setSendBufferSize(int sendBufferSize)
NetworkOptions
setSendBufferSize
in class NetServerOptions
sendBufferSize
- the buffers size, in bytespublic HttpServerOptions setReceiveBufferSize(int receiveBufferSize)
NetworkOptions
setReceiveBufferSize
in class NetServerOptions
receiveBufferSize
- the buffers size, in bytespublic HttpServerOptions setReuseAddress(boolean reuseAddress)
NetworkOptions
setReuseAddress
in class NetServerOptions
reuseAddress
- the value of reuse addresspublic HttpServerOptions setTrafficClass(int trafficClass)
NetworkOptions
setTrafficClass
in class NetServerOptions
trafficClass
- the value of traffic classpublic HttpServerOptions setTcpNoDelay(boolean tcpNoDelay)
TCPSSLOptions
setTcpNoDelay
in class NetServerOptions
tcpNoDelay
- true if TCP no delay is enabled (Nagle disabled)public HttpServerOptions setTcpKeepAlive(boolean tcpKeepAlive)
TCPSSLOptions
setTcpKeepAlive
in class NetServerOptions
tcpKeepAlive
- true if TCP keep alive is enabledpublic HttpServerOptions setSoLinger(int soLinger)
TCPSSLOptions
setSoLinger
in class NetServerOptions
soLinger
- true if SO_linger is enabledpublic HttpServerOptions setUsePooledBuffers(boolean usePooledBuffers)
TCPSSLOptions
setUsePooledBuffers
in class NetServerOptions
usePooledBuffers
- true if pooled buffers enabledpublic HttpServerOptions setIdleTimeout(int idleTimeout)
TCPSSLOptions
setIdleTimeout
in class NetServerOptions
idleTimeout
- the timeout, in secondspublic HttpServerOptions setSsl(boolean ssl)
TCPSSLOptions
setSsl
in class NetServerOptions
ssl
- true if enabledpublic HttpServerOptions setKeyStoreOptions(JksOptions options)
TCPSSLOptions
setKeyStoreOptions
in class NetServerOptions
options
- the key store in jks formatpublic HttpServerOptions setPfxKeyCertOptions(PfxOptions options)
TCPSSLOptions
setPfxKeyCertOptions
in class NetServerOptions
options
- the key cert options in pfx formatpublic HttpServerOptions setPemKeyCertOptions(PemKeyCertOptions options)
TCPSSLOptions
setPemKeyCertOptions
in class NetServerOptions
options
- the options in pem formatpublic HttpServerOptions setTrustStoreOptions(JksOptions options)
TCPSSLOptions
setTrustStoreOptions
in class NetServerOptions
options
- the options in jks formatpublic HttpServerOptions setPemTrustOptions(PemTrustOptions options)
TCPSSLOptions
setPemTrustOptions
in class NetServerOptions
options
- the options in pem formatpublic HttpServerOptions setPfxTrustOptions(PfxOptions options)
TCPSSLOptions
setPfxTrustOptions
in class NetServerOptions
options
- the options in pfx formatpublic HttpServerOptions addEnabledCipherSuite(String suite)
TCPSSLOptions
addEnabledCipherSuite
in class NetServerOptions
suite
- the suitepublic HttpServerOptions addCrlPath(String crlPath) throws NullPointerException
TCPSSLOptions
addCrlPath
in class NetServerOptions
crlPath
- the pathNullPointerException
public HttpServerOptions addCrlValue(Buffer crlValue) throws NullPointerException
TCPSSLOptions
addCrlValue
in class NetServerOptions
crlValue
- the valueNullPointerException
public HttpServerOptions setAcceptBacklog(int acceptBacklog)
NetServerOptions
setAcceptBacklog
in class NetServerOptions
acceptBacklog
- accept backlogpublic HttpServerOptions setPort(int port)
NetServerOptions
setPort
in class NetServerOptions
port
- the portpublic HttpServerOptions setHost(String host)
NetServerOptions
setHost
in class NetServerOptions
host
- the hostpublic boolean isCompressionSupported()
public HttpServerOptions setCompressionSupported(boolean compressionSupported)
compressionSupported
- true if compression supportedpublic int getMaxWebsocketFrameSize()
public HttpServerOptions setMaxWebsocketFrameSize(int maxWebsocketFrameSize)
maxWebsocketFrameSize
- the maximum frame size in bytes.public HttpServerOptions setWebsocketSubProtocol(String subProtocols)
subProtocols
- comma separated list of subprotocolspublic String getWebsocketSubProtocols()
public HttpServerOptions setClientAuthRequired(boolean clientAuthRequired)
NetServerOptions
setClientAuthRequired
in class NetServerOptions
clientAuthRequired
- true if client auth is requiredpublic boolean equals(Object o)
equals
in class NetServerOptions
public int hashCode()
hashCode
in class NetServerOptions
Copyright © 2015. All Rights Reserved.