public class MqttServerOptions
extends io.vertx.core.net.NetServerOptions
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEFAULT_AUTO_CLIENT_ID |
static int |
DEFAULT_MAX_CLIENT_ID_LENGTH |
static int |
DEFAULT_MAX_MESSAGE_SIZE |
static boolean |
DEFAULT_PER_FRAME_WEBSOCKET_COMPRESSION_SUPPORTED |
static boolean |
DEFAULT_PER_MESSAGE_WEBSOCKET_COMPRESSION_SUPPORTED |
static int |
DEFAULT_PORT |
static int |
DEFAULT_TIMEOUT_ON_CONNECT |
static int |
DEFAULT_TLS_PORT |
static boolean |
DEFAULT_USE_WEB_SOCKET |
static int |
DEFAULT_WEB_SOCKET_MAX_FRAME_SIZE |
static boolean |
DEFAULT_WEBSOCKET_ALLOW_SERVER_NO_CONTEXT |
static int |
DEFAULT_WEBSOCKET_COMPRESSION_LEVEL |
static boolean |
DEFAULT_WEBSOCKET_PREFERRED_CLIENT_NO_CONTEXT |
static String |
MQTT_SUBPROTOCOL_CSV_LIST |
DEFAULT_ACCEPT_BACKLOG, DEFAULT_CLIENT_AUTH, DEFAULT_HOST, DEFAULT_PROXY_PROTOCOL_TIMEOUT, DEFAULT_PROXY_PROTOCOL_TIMEOUT_TIME_UNIT, DEFAULT_REGISTER_WRITE_HANDLER, DEFAULT_SNI, DEFAULT_USE_PROXY_PROTOCOLDEFAULT_ENABLED_SECURE_TRANSPORT_PROTOCOLS, DEFAULT_IDLE_TIMEOUT, DEFAULT_IDLE_TIMEOUT_TIME_UNIT, DEFAULT_READ_IDLE_TIMEOUT, 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_KEEAPLIVE_INTERVAL_SECONDS, DEFAULT_TCP_KEEP_ALIVE, DEFAULT_TCP_KEEPALIVE_COUNT, DEFAULT_TCP_KEEPALIVE_IDLE_SECONDS, DEFAULT_TCP_NO_DELAY, DEFAULT_TCP_QUICKACK, DEFAULT_TCP_USER_TIMEOUT, DEFAULT_USE_ALPN, DEFAULT_WRITE_IDLE_TIMEOUT| Constructor and Description |
|---|
MqttServerOptions()
Default constructor
|
MqttServerOptions(io.vertx.core.json.JsonObject json)
Create an options from JSON
|
MqttServerOptions(MqttServerOptions other)
Copy constructor
|
| Modifier and Type | Method and Description |
|---|---|
MqttServerOptions |
addCrlPath(String crlPath) |
MqttServerOptions |
addCrlValue(io.vertx.core.buffer.Buffer crlValue) |
MqttServerOptions |
addEnabledCipherSuite(String suite) |
MqttServerOptions |
addEnabledSecureTransportProtocol(String protocol) |
int |
getMaxClientIdLength() |
int |
getMaxMessageSize() |
long |
getProxyProtocolTimeout() |
TimeUnit |
getProxyProtocolTimeoutUnit() |
int |
getWebSocketCompressionLevel() |
int |
getWebSocketMaxFrameSize() |
boolean |
isAutoClientId() |
boolean |
isPerFrameWebSocketCompressionSupported()
Get whether WebSocket the per-frame deflate compression extension is supported.
|
boolean |
isPerMessageWebSocketCompressionSupported()
Get whether WebSocket the per-frame deflate compression extension is supported.
|
boolean |
isUseProxyProtocol() |
boolean |
isUseWebSocket() |
boolean |
isWebSocketAllowServerNoContext() |
boolean |
isWebSocketPreferredClientNoContext() |
MqttServerOptions |
setAutoClientId(boolean isAutoClientId)
Set if clientid should be auto-generated when it's "zero-bytes"
|
MqttServerOptions |
setClientAuth(io.vertx.core.http.ClientAuth clientAuth) |
MqttServerOptions |
setHost(String host) |
MqttServerOptions |
setKeyCertOptions(io.vertx.core.net.KeyCertOptions options) |
MqttServerOptions |
setKeyStoreOptions(io.vertx.core.net.JksOptions options) |
MqttServerOptions |
setMaxClientIdLength(int maxClientIdLength)
Set the max client id length.
|
MqttServerOptions |
setMaxMessageSize(int maxMessageSize)
Set max MQTT message size
|
MqttServerOptions |
setPemKeyCertOptions(io.vertx.core.net.PemKeyCertOptions options) |
MqttServerOptions |
setPemTrustOptions(io.vertx.core.net.PemTrustOptions options) |
MqttServerOptions |
setPerFrameWebSocketCompressionSupported(boolean supported)
Enable or disable support for the WebSocket per-frame deflate compression extension.
|
MqttServerOptions |
setPerMessageWebSocketCompressionSupported(boolean supported)
Enable or disable support for WebSocket per-message deflate compression extension.
|
MqttServerOptions |
setPfxKeyCertOptions(io.vertx.core.net.PfxOptions options) |
MqttServerOptions |
setPfxTrustOptions(io.vertx.core.net.PfxOptions options) |
MqttServerOptions |
setPort(int port) |
MqttServerOptions |
setProxyProtocolTimeout(long proxyProtocolTimeout) |
MqttServerOptions |
setProxyProtocolTimeoutUnit(TimeUnit proxyProtocolTimeoutUnit) |
MqttServerOptions |
setReceiveBufferSize(int receiveBufferSize) |
MqttServerOptions |
setSni(boolean sni) |
MqttServerOptions |
setSsl(boolean ssl) |
MqttServerOptions |
setTimeoutOnConnect(int timeoutOnConnect)
Set the timeout on CONNECT packet
|
MqttServerOptions |
setTrustOptions(io.vertx.core.net.TrustOptions options) |
MqttServerOptions |
setTrustStoreOptions(io.vertx.core.net.JksOptions options) |
MqttServerOptions |
setUseProxyProtocol(boolean useProxyProtocol) |
MqttServerOptions |
setUseWebSocket(boolean useWebSocket)
enable mqtt over websocket
|
MqttServerOptions |
setWebSocketAllowServerNoContext(boolean accept)
Set whether the WebSocket server will accept the
server_no_context_takeover parameter of the per-message
deflate compression extension offered by the client. |
MqttServerOptions |
setWebSocketCompressionLevel(int compressionLevel)
Set the WebSocket compression level.
|
void |
setWebSocketMaxFrameSize(int webSocketMaxFrameSize)
Set the WebSocket max frame size.
|
MqttServerOptions |
setWebSocketPreferredClientNoContext(boolean accept)
Set whether the WebSocket server will accept the
client_no_context_takeover parameter of the per-message
deflate compression extension offered by the client. |
int |
timeoutOnConnect() |
io.vertx.core.json.JsonObject |
toJson() |
getAcceptBacklog, getClientAuth, getHost, getPort, getTrafficShapingOptions, isRegisterWriteHandler, isSni, removeEnabledCipherSuite, removeEnabledSecureTransportProtocol, setAcceptBacklog, setActivityLogDataFormat, setEnabledSecureTransportProtocols, setIdleTimeout, setIdleTimeoutUnit, setJdkSslEngineOptions, setLogActivity, setOpenSslEngineOptions, setReadIdleTimeout, setRegisterWriteHandler, setReuseAddress, setReusePort, setSendBufferSize, setSoLinger, setSslEngineOptions, setSslHandshakeTimeout, setSslHandshakeTimeoutUnit, setTcpCork, setTcpFastOpen, setTcpKeepAlive, setTcpNoDelay, setTcpQuickAck, setTrafficClass, setTrafficShapingOptions, setUseAlpn, setWriteIdleTimeoutgetCrlPaths, getCrlValues, getEnabledCipherSuites, getEnabledSecureTransportProtocols, getIdleTimeout, getIdleTimeoutUnit, getJdkSslEngineOptions, getKeyCertOptions, getKeyStoreOptions, getOpenSslEngineOptions, getPemKeyCertOptions, getPemTrustOptions, getPfxKeyCertOptions, getPfxTrustOptions, getReadIdleTimeout, getSoLinger, getSslEngineOptions, getSslHandshakeTimeout, getSslHandshakeTimeoutUnit, getSslOptions, getTcpKeepAliveCount, getTcpKeepAliveIdleSeconds, getTcpKeepAliveIntervalSeconds, getTcpUserTimeout, getTrustOptions, getTrustStoreOptions, getWriteIdleTimeout, isSsl, isTcpCork, isTcpFastOpen, isTcpKeepAlive, isTcpNoDelay, isTcpQuickAck, isUseAlpn, setTcpKeepAliveCount, setTcpKeepAliveIdleSeconds, setTcpKeepAliveIntervalSeconds, setTcpUserTimeoutpublic static final int DEFAULT_PORT
public static final int DEFAULT_TLS_PORT
public static final int DEFAULT_MAX_MESSAGE_SIZE
public static final boolean DEFAULT_AUTO_CLIENT_ID
public static final int DEFAULT_MAX_CLIENT_ID_LENGTH
public static final int DEFAULT_TIMEOUT_ON_CONNECT
public static final boolean DEFAULT_USE_WEB_SOCKET
public static final int DEFAULT_WEB_SOCKET_MAX_FRAME_SIZE
public static final boolean DEFAULT_PER_FRAME_WEBSOCKET_COMPRESSION_SUPPORTED
public static final boolean DEFAULT_PER_MESSAGE_WEBSOCKET_COMPRESSION_SUPPORTED
public static final int DEFAULT_WEBSOCKET_COMPRESSION_LEVEL
public static final boolean DEFAULT_WEBSOCKET_ALLOW_SERVER_NO_CONTEXT
public static final boolean DEFAULT_WEBSOCKET_PREFERRED_CLIENT_NO_CONTEXT
public static final String MQTT_SUBPROTOCOL_CSV_LIST
public MqttServerOptions()
public MqttServerOptions(io.vertx.core.json.JsonObject json)
json - the JSONpublic MqttServerOptions(MqttServerOptions other)
other - the options to copypublic MqttServerOptions setPort(int port)
setPort in class io.vertx.core.net.NetServerOptionspublic MqttServerOptions setHost(String host)
setHost in class io.vertx.core.net.NetServerOptionspublic MqttServerOptions setClientAuth(io.vertx.core.http.ClientAuth clientAuth)
setClientAuth in class io.vertx.core.net.NetServerOptionspublic MqttServerOptions setSsl(boolean ssl)
setSsl in class io.vertx.core.net.NetServerOptionspublic MqttServerOptions setKeyCertOptions(io.vertx.core.net.KeyCertOptions options)
setKeyCertOptions in class io.vertx.core.net.NetServerOptionspublic MqttServerOptions setKeyStoreOptions(io.vertx.core.net.JksOptions options)
setKeyStoreOptions in class io.vertx.core.net.NetServerOptionspublic MqttServerOptions setPfxKeyCertOptions(io.vertx.core.net.PfxOptions options)
setPfxKeyCertOptions in class io.vertx.core.net.NetServerOptionspublic MqttServerOptions setPemKeyCertOptions(io.vertx.core.net.PemKeyCertOptions options)
setPemKeyCertOptions in class io.vertx.core.net.NetServerOptionspublic MqttServerOptions setTrustOptions(io.vertx.core.net.TrustOptions options)
setTrustOptions in class io.vertx.core.net.NetServerOptionspublic MqttServerOptions setTrustStoreOptions(io.vertx.core.net.JksOptions options)
setTrustStoreOptions in class io.vertx.core.net.NetServerOptionspublic MqttServerOptions setPemTrustOptions(io.vertx.core.net.PemTrustOptions options)
setPemTrustOptions in class io.vertx.core.net.NetServerOptionspublic MqttServerOptions setPfxTrustOptions(io.vertx.core.net.PfxOptions options)
setPfxTrustOptions in class io.vertx.core.net.NetServerOptionspublic MqttServerOptions addEnabledCipherSuite(String suite)
addEnabledCipherSuite in class io.vertx.core.net.NetServerOptionspublic MqttServerOptions addEnabledSecureTransportProtocol(String protocol)
addEnabledSecureTransportProtocol in class io.vertx.core.net.NetServerOptionspublic MqttServerOptions addCrlPath(String crlPath) throws NullPointerException
addCrlPath in class io.vertx.core.net.NetServerOptionsNullPointerExceptionpublic MqttServerOptions addCrlValue(io.vertx.core.buffer.Buffer crlValue) throws NullPointerException
addCrlValue in class io.vertx.core.net.NetServerOptionsNullPointerExceptionpublic MqttServerOptions setReceiveBufferSize(int receiveBufferSize)
setReceiveBufferSize in class io.vertx.core.net.NetServerOptionspublic MqttServerOptions setSni(boolean sni)
setSni in class io.vertx.core.net.NetServerOptionspublic MqttServerOptions setMaxMessageSize(int maxMessageSize)
maxMessageSize - max MQTT message size (variable header + payload)public int getMaxMessageSize()
public MqttServerOptions setAutoClientId(boolean isAutoClientId)
isAutoClientId - public boolean isAutoClientId()
public int getMaxClientIdLength()
public MqttServerOptions setMaxClientIdLength(int maxClientIdLength)
maxClientIdLength - the new valuepublic MqttServerOptions setTimeoutOnConnect(int timeoutOnConnect)
timeoutOnConnect - timeout on CONNECT before closing connectionpublic MqttServerOptions setUseProxyProtocol(boolean useProxyProtocol)
setUseProxyProtocol in class io.vertx.core.net.NetServerOptionspublic boolean isUseProxyProtocol()
isUseProxyProtocol in class io.vertx.core.net.NetServerOptionspublic long getProxyProtocolTimeout()
getProxyProtocolTimeout in class io.vertx.core.net.NetServerOptionspublic MqttServerOptions setProxyProtocolTimeout(long proxyProtocolTimeout)
setProxyProtocolTimeout in class io.vertx.core.net.NetServerOptionspublic MqttServerOptions setProxyProtocolTimeoutUnit(TimeUnit proxyProtocolTimeoutUnit)
setProxyProtocolTimeoutUnit in class io.vertx.core.net.NetServerOptionspublic TimeUnit getProxyProtocolTimeoutUnit()
getProxyProtocolTimeoutUnit in class io.vertx.core.net.NetServerOptionspublic int timeoutOnConnect()
public MqttServerOptions setUseWebSocket(boolean useWebSocket)
useWebSocket - use mqtt over websocketpublic boolean isUseWebSocket()
public int getWebSocketMaxFrameSize()
public void setWebSocketMaxFrameSize(int webSocketMaxFrameSize)
This should be used when WebSocket transport is used and maxMessageSize is larger than the WebSocket frame size
webSocketMaxFrameSize - the new frame sizepublic boolean isPerFrameWebSocketCompressionSupported()
true if the http server will accept the per-frame deflate compression extensionpublic MqttServerOptions setPerFrameWebSocketCompressionSupported(boolean supported)
supported - true when the per-frame deflate compression extension is supportedpublic boolean isPerMessageWebSocketCompressionSupported()
true if the http server will accept the per-frame deflate compression extensionpublic MqttServerOptions setPerMessageWebSocketCompressionSupported(boolean supported)
supported - true when the per-message WebSocket compression extension is supportedpublic int getWebSocketCompressionLevel()
public MqttServerOptions setWebSocketCompressionLevel(int compressionLevel)
compressionLevel - the compression levelpublic boolean isWebSocketAllowServerNoContext()
true when the WebSocket server will accept the server_no_context_takeover parameter for the per-message
deflate compression extension offered by the clientpublic MqttServerOptions setWebSocketAllowServerNoContext(boolean accept)
server_no_context_takeover parameter of the per-message
deflate compression extension offered by the client.accept - true to accept the server_no_context_takeover parameter when the client offers itpublic boolean isWebSocketPreferredClientNoContext()
true when the WebSocket server will accept the client_no_context_takeover parameter for the per-message
deflate compression extension offered by the clientpublic MqttServerOptions setWebSocketPreferredClientNoContext(boolean accept)
client_no_context_takeover parameter of the per-message
deflate compression extension offered by the client.accept - true to accept the client_no_context_takeover parameter when the client offers itpublic io.vertx.core.json.JsonObject toJson()
toJson in class io.vertx.core.net.NetServerOptionsCopyright © 2024 Eclipse. All rights reserved.