public class MqttServerOptions extends 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_KEEP_ALIVE, DEFAULT_TCP_NO_DELAY, DEFAULT_TCP_QUICKACK, DEFAULT_TCP_USER_TIMEOUT, DEFAULT_USE_ALPN, DEFAULT_WRITE_IDLE_TIMEOUTDEFAULT_LOG_ACTIVITY_FORMAT, DEFAULT_LOG_ENABLED, DEFAULT_RECEIVE_BUFFER_SIZE, DEFAULT_REUSE_ADDRESS, DEFAULT_REUSE_PORT, DEFAULT_SEND_BUFFER_SIZE, DEFAULT_TRAFFIC_CLASS| Constructor and Description |
|---|
MqttServerOptions()
Default constructor
|
MqttServerOptions(JsonObject json)
Create an options from JSON
|
MqttServerOptions(MqttServerOptions other)
Copy constructor
|
getAcceptBacklog, getClientAuth, getHost, getPort, 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, setUseAlpn, setWriteIdleTimeoutgetCrlPaths, getCrlValues, getEnabledCipherSuites, getEnabledSecureTransportProtocols, getIdleTimeout, getIdleTimeoutUnit, getJdkSslEngineOptions, getKeyCertOptions, getKeyStoreOptions, getOpenSslEngineOptions, getPemKeyCertOptions, getPemTrustOptions, getPfxKeyCertOptions, getPfxTrustOptions, getReadIdleTimeout, getSoLinger, getSslEngineOptions, getSslHandshakeTimeout, getSslHandshakeTimeoutUnit, getSslOptions, getTcpUserTimeout, getTrustOptions, getTrustStoreOptions, getWriteIdleTimeout, isSsl, isTcpCork, isTcpFastOpen, isTcpKeepAlive, isTcpNoDelay, isTcpQuickAck, isUseAlpn, setTcpUserTimeoutgetActivityLogDataFormat, getLogActivity, getReceiveBufferSize, getSendBufferSize, getTrafficClass, isReuseAddress, isReusePortpublic 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(JsonObject json)
json - the JSONpublic MqttServerOptions(MqttServerOptions other)
other - the options to copypublic MqttServerOptions setPort(int port)
setPort in class NetServerOptionspublic MqttServerOptions setHost(String host)
setHost in class NetServerOptionspublic MqttServerOptions setClientAuth(ClientAuth clientAuth)
setClientAuth in class NetServerOptionspublic MqttServerOptions setSsl(boolean ssl)
setSsl in class NetServerOptionspublic MqttServerOptions setKeyCertOptions(KeyCertOptions options)
setKeyCertOptions in class NetServerOptionspublic MqttServerOptions setKeyStoreOptions(JksOptions options)
setKeyStoreOptions in class NetServerOptionspublic MqttServerOptions setPfxKeyCertOptions(PfxOptions options)
setPfxKeyCertOptions in class NetServerOptionspublic MqttServerOptions setPemKeyCertOptions(PemKeyCertOptions options)
setPemKeyCertOptions in class NetServerOptionspublic MqttServerOptions setTrustOptions(TrustOptions options)
setTrustOptions in class NetServerOptionspublic MqttServerOptions setTrustStoreOptions(JksOptions options)
setTrustStoreOptions in class NetServerOptionspublic MqttServerOptions setPemTrustOptions(PemTrustOptions options)
setPemTrustOptions in class NetServerOptionspublic MqttServerOptions setPfxTrustOptions(PfxOptions options)
setPfxTrustOptions in class NetServerOptionspublic MqttServerOptions addEnabledCipherSuite(String suite)
addEnabledCipherSuite in class NetServerOptionspublic MqttServerOptions addEnabledSecureTransportProtocol(String protocol)
addEnabledSecureTransportProtocol in class NetServerOptionspublic MqttServerOptions addCrlPath(String crlPath) throws NullPointerException
addCrlPath in class NetServerOptionsNullPointerExceptionpublic MqttServerOptions addCrlValue(Buffer crlValue) throws NullPointerException
addCrlValue in class NetServerOptionsNullPointerExceptionpublic MqttServerOptions setReceiveBufferSize(int receiveBufferSize)
setReceiveBufferSize in class NetServerOptionspublic MqttServerOptions setSni(boolean sni)
setSni in class 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 NetServerOptionspublic boolean isUseProxyProtocol()
isUseProxyProtocol in class NetServerOptionspublic long getProxyProtocolTimeout()
getProxyProtocolTimeout in class NetServerOptionspublic MqttServerOptions setProxyProtocolTimeout(long proxyProtocolTimeout)
setProxyProtocolTimeout in class NetServerOptionspublic MqttServerOptions setProxyProtocolTimeoutUnit(TimeUnit proxyProtocolTimeoutUnit)
setProxyProtocolTimeoutUnit in class NetServerOptionspublic TimeUnit getProxyProtocolTimeoutUnit()
getProxyProtocolTimeoutUnit in class 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 JsonObject toJson()
toJson in class NetServerOptionsCopyright © 2023 Eclipse. All rights reserved.