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 int` | `DEFAULT_MAX_MESSAGE_SIZE`
    `static int` | `DEFAULT_PORT`
    `static int` | `DEFAULT_TLS_PORT`

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

      `DEFAULT_ACCEPT_BACKLOG, DEFAULT_CLIENT_AUTH, DEFAULT_HOST`

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

      `DEFAULT_IDLE_TIMEOUT, DEFAULT_SO_LINGER, DEFAULT_SSL, DEFAULT_SSL_ENGINE, DEFAULT_TCP_KEEP_ALIVE, DEFAULT_TCP_NO_DELAY, DEFAULT_USE_ALPN, DEFAULT_USE_POOLED_BUFFERS`

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

      `DEFAULT_LOG_ENABLED, DEFAULT_RECEIVE_BUFFER_SIZE, DEFAULT_REUSE_ADDRESS, 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` | `getMaxMessageSize()`
    `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` | `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` | `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` | `setReceiveBufferSize(int receiveBufferSize)` Set the TCP receive buffer size
    `MqttServerOptions` | `setSsl(boolean ssl)` Set whether SSL/TLS is enabled
    `MqttServerOptions` | `setTrustOptions(TrustOptions options)` Set the trust options.
    `MqttServerOptions` | `setTrustStoreOptions(JksOptions options)` Set the trust options in jks format, aka Java truststore

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

      `equals, getAcceptBacklog, getClientAuth, getHost, getPort, hashCode, isClientAuthRequired, setAcceptBacklog, setClientAuth, setClientAuthRequired, setIdleTimeout, setJdkSslEngineOptions, setLogActivity, setOpenSslEngineOptions, setReuseAddress, setSendBufferSize, setSoLinger, setSslEngineOptions, setTcpKeepAlive, setTcpNoDelay, setTrafficClass, setUseAlpn, setUsePooledBuffers, toJson`

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

      `getCrlPaths, getCrlValues, getEnabledCipherSuites, getEnabledSecureTransportProtocols, getIdleTimeout, getJdkSslEngineOptions, getKeyCertOptions, getKeyStoreOptions, getOpenSslEngineOptions, getPemKeyCertOptions, getPemTrustOptions, getPfxKeyCertOptions, getPfxTrustOptions, getSoLinger, getSslEngineOptions, getTrustOptions, getTrustStoreOptions, isSsl, isTcpKeepAlive, isTcpNoDelay, isUseAlpn, isUsePooledBuffers`

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

      `getLogActivity, getReceiveBufferSize, getSendBufferSize, getTrafficClass, isReuseAddress`

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

      `clone, finalize, getClass, 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

  - ### 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

    - #### 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

    - #### 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 do enabled
      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

    - #### 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)

Copyright © 2017. All rights reserved.