public class ProtonServerOptions extends NetServerOptions
ProtonServer creation.DEFAULT_ACCEPT_BACKLOG, DEFAULT_CLIENT_AUTH, DEFAULT_HOST, DEFAULT_PORT, DEFAULT_SNIDEFAULT_ENABLED_SECURE_TRANSPORT_PROTOCOLS, DEFAULT_IDLE_TIMEOUT, DEFAULT_IDLE_TIMEOUT_TIME_UNIT, DEFAULT_SO_LINGER, DEFAULT_SSL, DEFAULT_SSL_ENGINE, DEFAULT_SSL_HANDSHAKE_TIMEOUT, DEFAULT_SSL_HANDSHAKE_TIMEOUT_TIME_UNIT, DEFAULT_TCP_CORK, DEFAULT_TCP_FAST_OPEN, DEFAULT_TCP_KEEP_ALIVE, DEFAULT_TCP_NO_DELAY, DEFAULT_TCP_QUICKACK, DEFAULT_USE_ALPN, DEFAULT_USE_POOLED_BUFFERSDEFAULT_LOG_ENABLED, DEFAULT_RECEIVE_BUFFER_SIZE, DEFAULT_REUSE_ADDRESS, DEFAULT_REUSE_PORT, DEFAULT_SEND_BUFFER_SIZE, DEFAULT_TRAFFIC_CLASS| Constructor and Description |
|---|
ProtonServerOptions() |
ProtonServerOptions(JsonObject json)
Create options from JSON
|
ProtonServerOptions(ProtonServerOptions other)
Copy constructor
|
| Modifier and Type | Method and Description |
|---|---|
ProtonServerOptions |
addCrlPath(String crlPath)
Add a CRL path
|
ProtonServerOptions |
addCrlValue(Buffer crlValue)
Add a CRL value
|
ProtonServerOptions |
addEnabledCipherSuite(String suite)
Add an enabled cipher suite, appended to the ordered suites.
|
ProtonServerOptions |
addEnabledSecureTransportProtocol(String protocol)
Add an enabled SSL/TLS protocols, appended to the ordered protocols.
|
boolean |
equals(Object obj) |
int |
getHeartbeat()
Gets the heart beat (in milliseconds) as maximum delay between sending frames for the remote peers.
|
int |
getMaxFrameSize()
Gets the maximum frame size for connections.
|
int |
hashCode() |
ProtonServerOptions |
removeEnabledSecureTransportProtocol(String protocol)
Removes an enabled SSL/TLS protocol from the ordered protocols.
|
ProtonServerOptions |
setAcceptBacklog(int acceptBacklog)
Set the accept back log
|
ProtonServerOptions |
setClientAuth(ClientAuth clientAuth)
Set whether client auth is required
|
ProtonServerOptions |
setClientAuthRequired(boolean clientAuthRequired)
Deprecated.
|
ProtonServerOptions |
setEnabledSecureTransportProtocols(Set<String> enabledSecureTransportProtocols)
Sets the list of enabled SSL/TLS protocols.
|
ProtonServerOptions |
setHeartbeat(int heartbeat)
Sets the heart beat (in milliseconds) as maximum delay between sending frames for the remote peers.
|
ProtonServerOptions |
setHost(String host)
Set the host
|
ProtonServerOptions |
setIdleTimeout(int idleTimeout)
Set the idle timeout, default time unit is seconds.
|
ProtonServerOptions |
setIdleTimeoutUnit(TimeUnit idleTimeoutUnit)
Set the idle timeout unit.
|
ProtonServerOptions |
setJdkSslEngineOptions(JdkSSLEngineOptions sslEngineOptions) |
ProtonServerOptions |
setKeyCertOptions(KeyCertOptions options)
Set the key/cert options.
|
ProtonServerOptions |
setKeyStoreOptions(JksOptions options)
Set the key/cert options in jks format, aka Java keystore.
|
ProtonServerOptions |
setLogActivity(boolean logEnabled)
Set to true to enabled network activity logging: Netty's pipeline is configured for logging on Netty's logger.
|
ProtonServerOptions |
setMaxFrameSize(int maxFrameSize)
Sets the maximum frame size for connections.
|
ProtonServerOptions |
setOpenSslEngineOptions(OpenSSLEngineOptions sslEngineOptions) |
ProtonServerOptions |
setPemKeyCertOptions(PemKeyCertOptions options)
Set the key/cert store options in pem format.
|
ProtonServerOptions |
setPemTrustOptions(PemTrustOptions options)
Set the trust options in pem format
|
ProtonServerOptions |
setPfxKeyCertOptions(PfxOptions options)
Set the key/cert options in pfx format.
|
ProtonServerOptions |
setPfxTrustOptions(PfxOptions options)
Set the trust options in pfx format
|
ProtonServerOptions |
setPort(int port)
Set the port
|
ProtonServerOptions |
setReceiveBufferSize(int receiveBufferSize)
Set the TCP receive buffer size
|
ProtonServerOptions |
setReuseAddress(boolean reuseAddress)
Set the value of reuse address
|
ProtonServerOptions |
setReusePort(boolean reusePort)
Set the value of reuse port.
|
ProtonServerOptions |
setSendBufferSize(int sendBufferSize)
Set the TCP send buffer size
|
ProtonServerOptions |
setSni(boolean sni)
Set whether the server supports Server Name Indiciation
|
ProtonServerOptions |
setSoLinger(int soLinger)
Set whether SO_linger keep alive is enabled
|
ProtonServerOptions |
setSsl(boolean ssl)
Set whether SSL/TLS is enabled
|
ProtonServerOptions |
setSslEngineOptions(SSLEngineOptions sslEngineOptions)
Set to use SSL engine implementation to use.
|
ProtonServerOptions |
setTcpCork(boolean tcpCork)
Enable the
TCP_CORK option - only with linux native transport. |
ProtonServerOptions |
setTcpFastOpen(boolean tcpFastOpen)
Enable the
TCP_FASTOPEN option - only with linux native transport. |
ProtonServerOptions |
setTcpKeepAlive(boolean tcpKeepAlive)
Set whether TCP keep alive is enabled
|
ProtonServerOptions |
setTcpNoDelay(boolean tcpNoDelay)
Set whether TCP no delay is enabled
|
ProtonServerOptions |
setTcpQuickAck(boolean tcpQuickAck)
Enable the
TCP_QUICKACK option - only with linux native transport. |
ProtonServerOptions |
setTrafficClass(int trafficClass)
Set the value of traffic class
|
ProtonServerOptions |
setTrustOptions(TrustOptions options)
Set the trust options.
|
ProtonServerOptions |
setTrustStoreOptions(JksOptions options)
Set the trust options in jks format, aka Java truststore
|
ProtonServerOptions |
setUseAlpn(boolean useAlpn)
Set the ALPN usage.
|
ProtonServerOptions |
setUsePooledBuffers(boolean usePooledBuffers)
Set whether Netty pooled buffers are enabled
|
JsonObject |
toJson()
Convert to JSON
|
getAcceptBacklog, getClientAuth, getHost, getPort, isClientAuthRequired, isSni, setSslHandshakeTimeout, setSslHandshakeTimeoutUnitgetCrlPaths, getCrlValues, getEnabledCipherSuites, getEnabledSecureTransportProtocols, getIdleTimeout, getIdleTimeoutUnit, getJdkSslEngineOptions, getKeyCertOptions, getKeyStoreOptions, getOpenSslEngineOptions, getPemKeyCertOptions, getPemTrustOptions, getPfxKeyCertOptions, getPfxTrustOptions, getSoLinger, getSslEngineOptions, getSslHandshakeTimeout, getSslHandshakeTimeoutUnit, getTrustOptions, getTrustStoreOptions, isSsl, isTcpCork, isTcpFastOpen, isTcpKeepAlive, isTcpNoDelay, isTcpQuickAck, isUseAlpn, isUsePooledBuffersgetLogActivity, getReceiveBufferSize, getSendBufferSize, getTrafficClass, isReuseAddress, isReusePortpublic ProtonServerOptions()
public ProtonServerOptions(ProtonServerOptions other)
other - the options to copypublic ProtonServerOptions(JsonObject json)
json - the JSONpublic JsonObject toJson()
toJson in class NetServerOptionspublic ProtonServerOptions setSendBufferSize(int sendBufferSize)
NetworkOptionssetSendBufferSize in class NetServerOptionssendBufferSize - the buffers size, in bytespublic ProtonServerOptions setReceiveBufferSize(int receiveBufferSize)
NetworkOptionssetReceiveBufferSize in class NetServerOptionsreceiveBufferSize - the buffers size, in bytespublic ProtonServerOptions setReuseAddress(boolean reuseAddress)
NetworkOptionssetReuseAddress in class NetServerOptionsreuseAddress - the value of reuse addresspublic ProtonServerOptions setTrafficClass(int trafficClass)
NetworkOptionssetTrafficClass in class NetServerOptionstrafficClass - the value of traffic classpublic ProtonServerOptions setTcpNoDelay(boolean tcpNoDelay)
TCPSSLOptionssetTcpNoDelay in class NetServerOptionstcpNoDelay - true if TCP no delay is enabled (Nagle disabled)public ProtonServerOptions setTcpKeepAlive(boolean tcpKeepAlive)
TCPSSLOptionssetTcpKeepAlive in class NetServerOptionstcpKeepAlive - true if TCP keep alive is enabledpublic ProtonServerOptions setSoLinger(int soLinger)
TCPSSLOptionssetSoLinger in class NetServerOptionssoLinger - true if SO_linger is enabledpublic ProtonServerOptions setUsePooledBuffers(boolean usePooledBuffers)
TCPSSLOptionssetUsePooledBuffers in class NetServerOptionsusePooledBuffers - true if pooled buffers enabledpublic ProtonServerOptions setIdleTimeout(int idleTimeout)
TCPSSLOptionsTCPSSLOptions.setIdleTimeoutUnit(TimeUnit)setIdleTimeout in class NetServerOptionsidleTimeout - the timeout, in secondspublic ProtonServerOptions setIdleTimeoutUnit(TimeUnit idleTimeoutUnit)
TCPSSLOptionssetIdleTimeoutUnit in class NetServerOptionsidleTimeoutUnit - specify time unit.public ProtonServerOptions setSsl(boolean ssl)
TCPSSLOptionssetSsl in class NetServerOptionsssl - true if enabledpublic ProtonServerOptions setKeyStoreOptions(JksOptions options)
TCPSSLOptionssetKeyStoreOptions in class NetServerOptionsoptions - the key store in jks formatpublic ProtonServerOptions setPfxKeyCertOptions(PfxOptions options)
TCPSSLOptionssetPfxKeyCertOptions in class NetServerOptionsoptions - the key cert options in pfx formatpublic ProtonServerOptions setPemKeyCertOptions(PemKeyCertOptions options)
TCPSSLOptionssetPemKeyCertOptions in class NetServerOptionsoptions - the options in pem formatpublic ProtonServerOptions setTrustStoreOptions(JksOptions options)
TCPSSLOptionssetTrustStoreOptions in class NetServerOptionsoptions - the trust options in jks formatpublic ProtonServerOptions setPfxTrustOptions(PfxOptions options)
TCPSSLOptionssetPfxTrustOptions in class NetServerOptionsoptions - the trust options in pfx formatpublic ProtonServerOptions setPemTrustOptions(PemTrustOptions options)
TCPSSLOptionssetPemTrustOptions in class NetServerOptionsoptions - the trust options in pem formatpublic ProtonServerOptions addEnabledCipherSuite(String suite)
TCPSSLOptionsaddEnabledCipherSuite in class NetServerOptionssuite - the suitepublic ProtonServerOptions addCrlPath(String crlPath) throws NullPointerException
TCPSSLOptionsaddCrlPath in class NetServerOptionscrlPath - the pathNullPointerExceptionpublic ProtonServerOptions addCrlValue(Buffer crlValue) throws NullPointerException
TCPSSLOptionsaddCrlValue in class NetServerOptionscrlValue - the valueNullPointerExceptionpublic ProtonServerOptions setAcceptBacklog(int acceptBacklog)
NetServerOptionssetAcceptBacklog in class NetServerOptionsacceptBacklog - accept backlogpublic ProtonServerOptions setPort(int port)
NetServerOptionssetPort in class NetServerOptionsport - the portpublic ProtonServerOptions setHost(String host)
NetServerOptionssetHost in class NetServerOptionshost - the host@Deprecated public ProtonServerOptions setClientAuthRequired(boolean clientAuthRequired)
NetServerOptionssetClientAuthRequired in class NetServerOptionsclientAuthRequired - true if client auth is requiredpublic ProtonServerOptions setClientAuth(ClientAuth clientAuth)
NetServerOptionssetClientAuth in class NetServerOptionsclientAuth - One of "NONE, REQUEST, REQUIRED". If it's set to "REQUIRED" then server will require the
SSL cert to be presented otherwise it won't accept the request. If it's set to "REQUEST" then
it won't mandate the certificate to be presented, basically make it optional.public int hashCode()
hashCode in class NetServerOptionspublic boolean equals(Object obj)
equals in class NetServerOptionspublic ProtonServerOptions setUseAlpn(boolean useAlpn)
TCPSSLOptionssetUseAlpn in class NetServerOptionsuseAlpn - true when Application-Layer Protocol Negotiation should be usedpublic ProtonServerOptions addEnabledSecureTransportProtocol(String protocol)
TCPSSLOptionsaddEnabledSecureTransportProtocol in class NetServerOptionsprotocol - the SSL/TLS protocol to enablepublic ProtonServerOptions removeEnabledSecureTransportProtocol(String protocol)
TCPSSLOptionsremoveEnabledSecureTransportProtocol in class NetServerOptionsprotocol - the SSL/TLS protocol to disablepublic ProtonServerOptions setEnabledSecureTransportProtocols(Set<String> enabledSecureTransportProtocols)
TCPSSLOptionssetEnabledSecureTransportProtocols in class NetServerOptionsenabledSecureTransportProtocols - the SSL/TLS protocols to enablepublic ProtonServerOptions setJdkSslEngineOptions(JdkSSLEngineOptions sslEngineOptions)
setJdkSslEngineOptions in class NetServerOptionspublic ProtonServerOptions setKeyCertOptions(KeyCertOptions options)
TCPSSLOptionssetKeyCertOptions in class NetServerOptionsoptions - the key store optionspublic ProtonServerOptions setOpenSslEngineOptions(OpenSSLEngineOptions sslEngineOptions)
setOpenSslEngineOptions in class NetServerOptionspublic ProtonServerOptions setSslEngineOptions(SSLEngineOptions sslEngineOptions)
TCPSSLOptionssetSslEngineOptions in class NetServerOptionssslEngineOptions - the ssl engine to usepublic ProtonServerOptions setTrustOptions(TrustOptions options)
TCPSSLOptionssetTrustOptions in class NetServerOptionsoptions - the trust optionspublic ProtonServerOptions setLogActivity(boolean logEnabled)
NetworkOptionssetLogActivity in class NetServerOptionslogEnabled - true for logging the network activitypublic ProtonServerOptions setSni(boolean sni)
NetServerOptionssetSni in class NetServerOptionspublic ProtonServerOptions setReusePort(boolean reusePort)
NetworkOptionssetReusePort in class NetServerOptionsreusePort - the value of reuse portpublic ProtonServerOptions setTcpFastOpen(boolean tcpFastOpen)
TCPSSLOptionsTCP_FASTOPEN option - only with linux native transport.setTcpFastOpen in class NetServerOptionstcpFastOpen - the fast open valuepublic ProtonServerOptions setTcpCork(boolean tcpCork)
TCPSSLOptionsTCP_CORK option - only with linux native transport.setTcpCork in class NetServerOptionstcpCork - the cork valuepublic ProtonServerOptions setTcpQuickAck(boolean tcpQuickAck)
TCPSSLOptionsTCP_QUICKACK option - only with linux native transport.setTcpQuickAck in class NetServerOptionstcpQuickAck - the quick ack valuepublic ProtonServerOptions setHeartbeat(int heartbeat)
heartbeat - heart beat maximum delaypublic int getHeartbeat()
public ProtonServerOptions setMaxFrameSize(int maxFrameSize)
If this property is not set explicitly, a reasonable default value is used.
Setting this property to a negative value will result in no maximum frame size being announced at all.
maxFrameSize - The frame size in bytes.public int getMaxFrameSize()
If this property is not set explicitly, a reasonable default value is used.
Copyright © 2020. All rights reserved.