io.vertx.mqtt

## Class MqttServerOptions

- java.lang.Object
- - io.vertx.core.net.NetworkOptions
  - - io.vertx.core.net.TCPSSLOptions
    - - io.vertx.core.net.NetServerOptions
      - - io.vertx.mqtt.MqttServerOptions

-     public class MqttServerOptions
      extends NetServerOptions

  Represents options used by the MQTT server

- - ### Field Summary

    Fields
    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`

    - ### Fields inherited from class io.vertx.core.net.NetServerOptions

      `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_PROTOCOL`

    - ### Fields inherited from class io.vertx.core.net.TCPSSLOptions

      `DEFAULT_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_TIMEOUT`

    - ### Fields inherited from class io.vertx.core.net.NetworkOptions

      `DEFAULT_LOG_ACTIVITY_FORMAT, DEFAULT_LOG_ENABLED, DEFAULT_RECEIVE_BUFFER_SIZE, DEFAULT_REUSE_ADDRESS, DEFAULT_REUSE_PORT, DEFAULT_SEND_BUFFER_SIZE, DEFAULT_TRAFFIC_CLASS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MqttServerOptions()` Default constructor
    `MqttServerOptions(JsonObject json)` Create an options from JSON
    `MqttServerOptions(MqttServerOptions other)` Copy constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `MqttServerOptions` | `addCrlPath(String crlPath)` Add a CRL path
    `MqttServerOptions` | `addCrlValue(Buffer crlValue)` Add a CRL value
    `MqttServerOptions` | `addEnabledCipherSuite(String suite)` Add an enabled cipher suite, appended to the ordered suites.
    `MqttServerOptions` | `addEnabledSecureTransportProtocol(String protocol)` Add an enabled SSL/TLS protocols, appended to the ordered protocols.
    `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(ClientAuth clientAuth)` Set whether client auth is required
    `MqttServerOptions` | `setHost(String host)` Set the host
    `MqttServerOptions` | `setKeyCertOptions(KeyCertOptions options)` Set the key/cert options.
    `MqttServerOptions` | `setKeyStoreOptions(JksOptions options)` Set the key/cert options in jks format, aka Java keystore.
    `MqttServerOptions` | `setMaxClientIdLength(int maxClientIdLength)` Set the max client id length.
    `MqttServerOptions` | `setMaxMessageSize(int maxMessageSize)` Set max MQTT message size
    `MqttServerOptions` | `setPemKeyCertOptions(PemKeyCertOptions options)` Set the key/cert store options in pem format.
    `MqttServerOptions` | `setPemTrustOptions(PemTrustOptions options)` Set the trust options in pem format
    `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(PfxOptions options)` Set the key/cert options in pfx format.
    `MqttServerOptions` | `setPfxTrustOptions(PfxOptions options)` Set the trust options in pfx format
    `MqttServerOptions` | `setPort(int port)` Set the port
    `MqttServerOptions` | `setProxyProtocolTimeout(long proxyProtocolTimeout)` Set the Proxy protocol timeout, default time unit is seconds.
    `MqttServerOptions` | `setProxyProtocolTimeoutUnit(TimeUnit proxyProtocolTimeoutUnit)` Set the Proxy protocol timeout unit.
    `MqttServerOptions` | `setReceiveBufferSize(int receiveBufferSize)` Set the TCP receive buffer size
    `MqttServerOptions` | `setSni(boolean sni)` Set whether the server supports Server Name Indiciation
    `MqttServerOptions` | `setSsl(boolean ssl)` Set whether SSL/TLS is enabled
    `MqttServerOptions` | `setTimeoutOnConnect(int timeoutOnConnect)` Set the timeout on CONNECT packet
    `MqttServerOptions` | `setTrustOptions(TrustOptions options)` Set the trust options.
    `MqttServerOptions` | `setTrustStoreOptions(JksOptions options)` Set the trust options in jks format, aka Java truststore
    `MqttServerOptions` | `setUseProxyProtocol(boolean useProxyProtocol)` Set whether the server uses the HA Proxy protocol
    `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()`
    `JsonObject` | `toJson()` Convert to JSON

    - ### Methods inherited from class io.vertx.core.net.NetServerOptions

      `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, setWriteIdleTimeout`

    - ### Methods inherited from class io.vertx.core.net.TCPSSLOptions

      `getCrlPaths, 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, setTcpUserTimeout`

    - ### Methods inherited from class io.vertx.core.net.NetworkOptions

      `getActivityLogDataFormat, getLogActivity, getReceiveBufferSize, getSendBufferSize, getTrafficClass, isReuseAddress, isReusePort`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_PORT

          public static final int DEFAULT_PORT

      See Also:
        Constant Field Values

    - #### DEFAULT_TLS_PORT

          public static final int DEFAULT_TLS_PORT

      See Also:
        Constant Field Values

    - #### DEFAULT_MAX_MESSAGE_SIZE

          public static final int DEFAULT_MAX_MESSAGE_SIZE

      See Also:
        Constant Field Values

    - #### DEFAULT_AUTO_CLIENT_ID

          public static final boolean DEFAULT_AUTO_CLIENT_ID

      See Also:
        Constant Field Values

    - #### DEFAULT_MAX_CLIENT_ID_LENGTH

          public static final int DEFAULT_MAX_CLIENT_ID_LENGTH

      See Also:
        Constant Field Values

    - #### DEFAULT_TIMEOUT_ON_CONNECT

          public static final int DEFAULT_TIMEOUT_ON_CONNECT

      See Also:
        Constant Field Values

    - #### DEFAULT_USE_WEB_SOCKET

          public static final boolean DEFAULT_USE_WEB_SOCKET

      See Also:
        Constant Field Values

    - #### DEFAULT_WEB_SOCKET_MAX_FRAME_SIZE

          public static final int DEFAULT_WEB_SOCKET_MAX_FRAME_SIZE

      See Also:
        Constant Field Values

    - #### DEFAULT_PER_FRAME_WEBSOCKET_COMPRESSION_SUPPORTED

          public static final boolean DEFAULT_PER_FRAME_WEBSOCKET_COMPRESSION_SUPPORTED

      See Also:
        Constant Field Values

    - #### DEFAULT_PER_MESSAGE_WEBSOCKET_COMPRESSION_SUPPORTED

          public static final boolean DEFAULT_PER_MESSAGE_WEBSOCKET_COMPRESSION_SUPPORTED

      See Also:
        Constant Field Values

    - #### DEFAULT_WEBSOCKET_COMPRESSION_LEVEL

          public static final int DEFAULT_WEBSOCKET_COMPRESSION_LEVEL

      See Also:
        Constant Field Values

    - #### DEFAULT_WEBSOCKET_ALLOW_SERVER_NO_CONTEXT

          public static final boolean DEFAULT_WEBSOCKET_ALLOW_SERVER_NO_CONTEXT

      See Also:
        Constant Field Values

    - #### DEFAULT_WEBSOCKET_PREFERRED_CLIENT_NO_CONTEXT

          public static final boolean DEFAULT_WEBSOCKET_PREFERRED_CLIENT_NO_CONTEXT

      See Also:
        Constant Field Values

    - #### MQTT_SUBPROTOCOL_CSV_LIST

          public static final String MQTT_SUBPROTOCOL_CSV_LIST

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### MqttServerOptions

          public MqttServerOptions()

      Default constructor

    - #### MqttServerOptions

          public MqttServerOptions(JsonObject json)

      Create an options from JSON
      Parameters:
        `json` - the JSON

    - #### MqttServerOptions

          public MqttServerOptions(MqttServerOptions other)

      Copy constructor
      Parameters:
        `other` - the options to copy

  - ### Method Detail

    - #### setPort

          public MqttServerOptions setPort(int port)

      Description copied from class: `NetServerOptions`
      Set the port
      Overrides:
        `setPort` in class `NetServerOptions`
      Parameters:
        `port` - the port
      Returns:
        a reference to this, so the API can be used fluently

    - #### setHost

          public MqttServerOptions setHost(String host)

      Description copied from class: `NetServerOptions`
      Set the host
      Overrides:
        `setHost` in class `NetServerOptions`
      Parameters:
        `host` - the host
      Returns:
        a reference to this, so the API can be used fluently

    - #### setClientAuth

          public MqttServerOptions setClientAuth(ClientAuth clientAuth)

      Description copied from class: `NetServerOptions`
      Set whether client auth is required
      Overrides:
        `setClientAuth` in class `NetServerOptions`
      Parameters:
        `clientAuth` - 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.
      Returns:
        a reference to this, so the API can be used fluently

    - #### setSsl

          public MqttServerOptions setSsl(boolean ssl)

      Description copied from class: `TCPSSLOptions`
      Set whether SSL/TLS is enabled
      Overrides:
        `setSsl` in class `NetServerOptions`
      Parameters:
        `ssl` - true if enabled
      Returns:
        a reference to this, so the API can be used fluently

    - #### setKeyCertOptions

          public MqttServerOptions setKeyCertOptions(KeyCertOptions options)

      Description copied from class: `TCPSSLOptions`
      Set the key/cert options.
      Overrides:
        `setKeyCertOptions` in class `NetServerOptions`
      Parameters:
        `options` - the key store options
      Returns:
        a reference to this, so the API can be used fluently

    - #### setKeyStoreOptions

          public MqttServerOptions setKeyStoreOptions(JksOptions options)

      Description copied from class: `TCPSSLOptions`
      Set the key/cert options in jks format, aka Java keystore.
      Overrides:
        `setKeyStoreOptions` in class `NetServerOptions`
      Parameters:
        `options` - the key store in jks format
      Returns:
        a reference to this, so the API can be used fluently

    - #### setPfxKeyCertOptions

          public MqttServerOptions setPfxKeyCertOptions(PfxOptions options)

      Description copied from class: `TCPSSLOptions`
      Set the key/cert options in pfx format.
      Overrides:
        `setPfxKeyCertOptions` in class `NetServerOptions`
      Parameters:
        `options` - the key cert options in pfx format
      Returns:
        a reference to this, so the API can be used fluently

    - #### setPemKeyCertOptions

          public MqttServerOptions setPemKeyCertOptions(PemKeyCertOptions options)

      Description copied from class: `TCPSSLOptions`
      Set the key/cert store options in pem format.
      Overrides:
        `setPemKeyCertOptions` in class `NetServerOptions`
      Parameters:
        `options` - the options in pem format
      Returns:
        a reference to this, so the API can be used fluently

    - #### setTrustOptions

          public MqttServerOptions setTrustOptions(TrustOptions options)

      Description copied from class: `TCPSSLOptions`
      Set the trust options.
      Overrides:
        `setTrustOptions` in class `NetServerOptions`
      Parameters:
        `options` - the trust options
      Returns:
        a reference to this, so the API can be used fluently

    - #### setTrustStoreOptions

          public MqttServerOptions setTrustStoreOptions(JksOptions options)

      Description copied from class: `TCPSSLOptions`
      Set the trust options in jks format, aka Java truststore
      Overrides:
        `setTrustStoreOptions` in class `NetServerOptions`
      Parameters:
        `options` - the trust options in jks format
      Returns:
        a reference to this, so the API can be used fluently

    - #### setPemTrustOptions

          public MqttServerOptions setPemTrustOptions(PemTrustOptions options)

      Description copied from class: `TCPSSLOptions`
      Set the trust options in pem format
      Overrides:
        `setPemTrustOptions` in class `NetServerOptions`
      Parameters:
        `options` - the trust options in pem format
      Returns:
        a reference to this, so the API can be used fluently

    - #### setPfxTrustOptions

          public MqttServerOptions setPfxTrustOptions(PfxOptions options)

      Description copied from class: `TCPSSLOptions`
      Set the trust options in pfx format
      Overrides:
        `setPfxTrustOptions` in class `NetServerOptions`
      Parameters:
        `options` - the trust options in pfx format
      Returns:
        a reference to this, so the API can be used fluently

    - #### addEnabledCipherSuite

          public MqttServerOptions addEnabledCipherSuite(String suite)

      Description copied from class: `TCPSSLOptions`
      Add an enabled cipher suite, appended to the ordered suites.
      Overrides:
        `addEnabledCipherSuite` in class `NetServerOptions`
      Parameters:
        `suite` - the suite
      Returns:
        a reference to this, so the API can be used fluently
      See Also:
        `TCPSSLOptions.getEnabledCipherSuites()`

    - #### addEnabledSecureTransportProtocol

          public MqttServerOptions addEnabledSecureTransportProtocol(String protocol)

      Description copied from class: `TCPSSLOptions`
      Add an enabled SSL/TLS protocols, appended to the ordered protocols.
      Overrides:
        `addEnabledSecureTransportProtocol` in class `NetServerOptions`
      Parameters:
        `protocol` - the SSL/TLS protocol to enable
      Returns:
        a reference to this, so the API can be used fluently

    - #### addCrlPath

          public MqttServerOptions addCrlPath(String crlPath)
                                       throws NullPointerException

      Description copied from class: `TCPSSLOptions`
      Add a CRL path
      Overrides:
        `addCrlPath` in class `NetServerOptions`
      Parameters:
        `crlPath` - the path
      Returns:
        a reference to this, so the API can be used fluently
      Throws:
        `NullPointerException`

    - #### addCrlValue

          public MqttServerOptions addCrlValue(Buffer crlValue)
                                        throws NullPointerException

      Description copied from class: `TCPSSLOptions`
      Add a CRL value
      Overrides:
        `addCrlValue` in class `NetServerOptions`
      Parameters:
        `crlValue` - the value
      Returns:
        a reference to this, so the API can be used fluently
      Throws:
        `NullPointerException`

    - #### setReceiveBufferSize

          public MqttServerOptions setReceiveBufferSize(int receiveBufferSize)

      Description copied from class: `NetworkOptions`
      Set the TCP receive buffer size
      Overrides:
        `setReceiveBufferSize` in class `NetServerOptions`
      Parameters:
        `receiveBufferSize` - the buffers size, in bytes
      Returns:
        a reference to this, so the API can be used fluently

    - #### setSni

          public MqttServerOptions setSni(boolean sni)

      Description copied from class: `NetServerOptions`
      Set whether the server supports Server Name Indiciation
      Overrides:
        `setSni` in class `NetServerOptions`
      Returns:
        a reference to this, so the API can be used fluently

    - #### setMaxMessageSize

          public MqttServerOptions setMaxMessageSize(int maxMessageSize)

      Set max MQTT message size
      Parameters:
        `maxMessageSize` - max MQTT message size (variable header + payload)
      Returns:
        MQTT server options instance

    - #### getMaxMessageSize

          public int getMaxMessageSize()

      Returns:
        max MQTT message size (variable header + payload)

    - #### setAutoClientId

          public MqttServerOptions setAutoClientId(boolean isAutoClientId)

      Set if clientid should be auto-generated when it's "zero-bytes"
      Parameters:
        `isAutoClientId` -
      Returns:
        MQTT server options instance

    - #### isAutoClientId

          public boolean isAutoClientId()

      Returns:
        if clientid should be auto-generated when it's "zero-bytes" (default is true)

    - #### getMaxClientIdLength

          public int getMaxClientIdLength()

      Returns:
        the max client id length

    - #### setMaxClientIdLength

          public MqttServerOptions setMaxClientIdLength(int maxClientIdLength)

      Set the max client id length.
      Parameters:
        `maxClientIdLength` - the new value
      Returns:
        MQTT server options instance

    - #### setTimeoutOnConnect

          public MqttServerOptions setTimeoutOnConnect(int timeoutOnConnect)

      Set the timeout on CONNECT packet
      Parameters:
        `timeoutOnConnect` - timeout on CONNECT before closing connection
      Returns:
        MQTT server options instance

    - #### setUseProxyProtocol

          public MqttServerOptions setUseProxyProtocol(boolean useProxyProtocol)

      Description copied from class: `NetServerOptions`
      Set whether the server uses the HA Proxy protocol
      Overrides:
        `setUseProxyProtocol` in class `NetServerOptions`
      Returns:
        a reference to this, so the API can be used fluently

    - #### isUseProxyProtocol

          public boolean isUseProxyProtocol()

      Overrides:
        `isUseProxyProtocol` in class `NetServerOptions`
      Returns:
        whether the server uses the HA Proxy protocol

    - #### getProxyProtocolTimeout

          public long getProxyProtocolTimeout()

      Overrides:
        `getProxyProtocolTimeout` in class `NetServerOptions`
      Returns:
        the Proxy protocol timeout, in time unit specified by `NetServerOptions.getProxyProtocolTimeoutUnit()`.

    - #### setProxyProtocolTimeout

          public MqttServerOptions setProxyProtocolTimeout(long proxyProtocolTimeout)

      Description copied from class: `NetServerOptions`
      Set the Proxy protocol timeout, default time unit is seconds.
      Overrides:
        `setProxyProtocolTimeout` in class `NetServerOptions`
      Parameters:
        `proxyProtocolTimeout` - the Proxy protocol timeout to set
      Returns:
        a reference to this, so the API can be used fluently

    - #### setProxyProtocolTimeoutUnit

          public MqttServerOptions setProxyProtocolTimeoutUnit(TimeUnit proxyProtocolTimeoutUnit)

      Description copied from class: `NetServerOptions`
      Set the Proxy protocol timeout unit. If not specified, default is seconds.
      Overrides:
        `setProxyProtocolTimeoutUnit` in class `NetServerOptions`
      Parameters:
        `proxyProtocolTimeoutUnit` - specify time unit.
      Returns:
        a reference to this, so the API can be used fluently

    - #### getProxyProtocolTimeoutUnit

          public TimeUnit getProxyProtocolTimeoutUnit()

      Overrides:
        `getProxyProtocolTimeoutUnit` in class `NetServerOptions`
      Returns:
        the Proxy protocol timeout unit.

    - #### timeoutOnConnect

          public int timeoutOnConnect()

      Returns:
        timeout on CONNECT before closing connection

    - #### setUseWebSocket

          public MqttServerOptions setUseWebSocket(boolean useWebSocket)

      enable mqtt over websocket
      Parameters:
        `useWebSocket` - use mqtt over websocket
      Returns:
        MQTT server options instance

    - #### isUseWebSocket

          public boolean isUseWebSocket()

      Returns:
        use mqtt over websocket

    - #### getWebSocketMaxFrameSize

          public int getWebSocketMaxFrameSize()

      Returns:
        the WebSocket max frame size

    - #### setWebSocketMaxFrameSize

          public void setWebSocketMaxFrameSize(int webSocketMaxFrameSize)

      Set the WebSocket max frame size.

      This should be used when WebSocket transport is used and `maxMessageSize` is larger than the WebSocket frame size

      Parameters:
        `webSocketMaxFrameSize` - the new frame size

    - #### isPerFrameWebSocketCompressionSupported

          public boolean isPerFrameWebSocketCompressionSupported()

      Get whether WebSocket the per-frame deflate compression extension is supported.
      Returns:
        `true` if the http server will accept the per-frame deflate compression extension

    - #### setPerFrameWebSocketCompressionSupported

          public MqttServerOptions setPerFrameWebSocketCompressionSupported(boolean supported)

      Enable or disable support for the WebSocket per-frame deflate compression extension.
      Parameters:
        `supported` - `true` when the per-frame deflate compression extension is supported
      Returns:
        a reference to this, so the API can be used fluently

    - #### isPerMessageWebSocketCompressionSupported

          public boolean isPerMessageWebSocketCompressionSupported()

      Get whether WebSocket the per-frame deflate compression extension is supported.
      Returns:
        `true` if the http server will accept the per-frame deflate compression extension

    - #### setPerMessageWebSocketCompressionSupported

          public MqttServerOptions setPerMessageWebSocketCompressionSupported(boolean supported)

      Enable or disable support for WebSocket per-message deflate compression extension.
      Parameters:
        `supported` - `true` when the per-message WebSocket compression extension is supported
      Returns:
        a reference to this, so the API can be used fluently

    - #### getWebSocketCompressionLevel

          public int getWebSocketCompressionLevel()

      Returns:
        the current WebSocket deflate compression level

    - #### setWebSocketCompressionLevel

          public MqttServerOptions setWebSocketCompressionLevel(int compressionLevel)

      Set the WebSocket compression level.
      Parameters:
        `compressionLevel` - the compression level
      Returns:
        a reference to this, so the API can be used fluently

    - #### isWebSocketAllowServerNoContext

          public boolean isWebSocketAllowServerNoContext()

      Returns:
        `true` when the WebSocket server will accept the `server_no_context_takeover` parameter for the per-message deflate compression extension offered by the client

    - #### setWebSocketAllowServerNoContext

          public 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.
      Parameters:
        `accept` - `true` to accept the server_no_context_takeover parameter when the client offers it
      Returns:
        a reference to this, so the API can be used fluently

    - #### isWebSocketPreferredClientNoContext

          public boolean isWebSocketPreferredClientNoContext()

      Returns:
        `true` when the WebSocket server will accept the `client_no_context_takeover` parameter for the per-message deflate compression extension offered by the client

    - #### setWebSocketPreferredClientNoContext

          public 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.
      Parameters:
        `accept` - `true` to accept the `client_no_context_takeover` parameter when the client offers it
      Returns:
        a reference to this, so the API can be used fluently

    - #### toJson

          public JsonObject toJson()

      Description copied from class: `NetServerOptions`
      Convert to JSON
      Overrides:
        `toJson` in class `NetServerOptions`
      Returns:
        the JSON

Copyright © 2024 Eclipse. All rights reserved.