io.vertx.ext.stomp

## Class StompClientOptions

- java.lang.Object
- - io.vertx.core.net.NetworkOptions
  - - io.vertx.core.net.TCPSSLOptions
    - - io.vertx.core.net.ClientOptionsBase
      - - io.vertx.core.net.NetClientOptions
        - - io.vertx.ext.stomp.StompClientOptions

- All Implemented Interfaces:
    StompOptions

      public class StompClientOptions
      extends NetClientOptions
      implements StompOptions

  Options used to configure a STOMP client. As a STOMP client wraps a Net client, you can also configure the underlying NET client.
  Author:
    Clement Escoffier

- - ### Field Summary

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

      `DEFAULT_RECONNECT_ATTEMPTS, DEFAULT_RECONNECT_INTERVAL`

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

      `DEFAULT_CONNECT_TIMEOUT, DEFAULT_TRUST_ALL`

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

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

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

      `DEFAULT_RECEIVE_BUFFER_SIZE, DEFAULT_REUSE_ADDRESS, DEFAULT_SEND_BUFFER_SIZE, DEFAULT_TRAFFIC_CLASS`

    - ### Fields inherited from interface io.vertx.ext.stomp.StompOptions

      `DEFAULT_STOMP_HEARTBEAT, DEFAULT_STOMP_HOST, DEFAULT_STOMP_PORT, DEFAULT_SUPPORTED_VERSIONS, UTF_8`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StompClientOptions()` Default constructor.
    `StompClientOptions(JsonObject json)` Creates an instance from a `JsonObject`.
    `StompClientOptions(StompClientOptions other)` Copy constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<String>` | `getAcceptedVersions()` Gets the list of STOMP protocol versions accepted by the client.
    `JsonObject` | `getHeartbeat()` Gets the heartbeat configuration.
    `String` | `getHost()` Gets the STOMP server host.
    `String` | `getLogin()` Gets the configured login.
    `String` | `getPasscode()` Gets the configured passcode.
    `int` | `getPort()` Gets the STOMP server port.
    `boolean` | `isAutoComputeContentLength()` Whether or not the automatic computation of the `content-length` header is enabled.
    `boolean` | `isBypassHostHeader()` Checks whether or not the `host` header must be dropped from the `CONNECT/STOMP` frame.
    `boolean` | `isUseStompFrame()` Checks whether or not the connection is made using the `STOMP` command instead of the `CONNECT` command.
    `StompClientOptions` | `setAcceptedVersions(List<String> acceptedVersions)` Sets the list of STOMP protocol versions accepted by the client.
    `StompClientOptions` | `setAutoComputeContentLength(boolean autoComputeContentLength)` Sets whether or not the automatic computation of the `content-length` header is enabled.
    `StompClientOptions` | `setBypassHostHeader(boolean bypassHostHeader)` Sets whether or not the `host` header must be dropped from the `CONNECT/STOMP` frame.
    `StompClientOptions` | `setHeartbeat(JsonObject heartbeat)` Sets the heartbeat configuration.
    `StompClientOptions` | `setHost(String host)` Sets the STOMP server host.
    `StompClientOptions` | `setLogin(String login)` Sets the login to use if the STOMP server is secured.
    `StompClientOptions` | `setPasscode(String passcode)` Sets the passcode to use if the STOMP server is secured.
    `StompClientOptions` | `setPort(int port)` Sets the STOMP server port.
    `StompClientOptions` | `setSsl(boolean ssl)` Set whether SSL/TLS is enabled
    `StompClientOptions` | `setUseStompFrame(boolean useStompFrame)` Sets whether or not the connection is made using the `STOMP` command instead of the `CONNECT` command.
    `JsonObject` | `toJson()`

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

      `addCrlPath, addCrlValue, addEnabledCipherSuite, equals, getReconnectAttempts, getReconnectInterval, hashCode, setConnectTimeout, setIdleTimeout, setKeyStoreOptions, setPemKeyCertOptions, setPemTrustOptions, setPfxKeyCertOptions, setPfxTrustOptions, setReceiveBufferSize, setReconnectAttempts, setReconnectInterval, setReuseAddress, setSendBufferSize, setSoLinger, setTcpKeepAlive, setTcpNoDelay, setTrafficClass, setTrustAll, setTrustStoreOptions, setUsePooledBuffers`

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

      `getConnectTimeout, isTrustAll`

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

      `getCrlPaths, getCrlValues, getEnabledCipherSuites, getIdleTimeout, getKeyCertOptions, getSoLinger, getTrustOptions, isSsl, isTcpKeepAlive, isTcpNoDelay, isUsePooledBuffers`

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

      `getReceiveBufferSize, getSendBufferSize, getTrafficClass, isReuseAddress`

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

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

- - ### Constructor Detail

    - #### StompClientOptions

          public StompClientOptions()

      Default constructor.

    - #### StompClientOptions

          public StompClientOptions(StompClientOptions other)

      Copy constructor.
      Parameters:
        `other` - The other `StompServerOptions` to copy when creating this

    - #### StompClientOptions

          public StompClientOptions(JsonObject json)

      Creates an instance from a `JsonObject`.
      Parameters:
        `json` - the JsonObject to create it from

  - ### Method Detail

    - #### toJson

          public JsonObject toJson()

      Returns:
        a JSON representation of the options.

    - #### getHost

          public String getHost()

      Gets the STOMP server host.
      Returns:
        the STOMP server host

    - #### setHost

          public StompClientOptions setHost(String host)

      Sets the STOMP server host. `0.0.0.0` by default.
      Parameters:
        `host` - the host name of the STOMP server
      Returns:
        the current `StompClientOptions`

    - #### getLogin

          public String getLogin()

      Gets the configured login.
      Returns:
        the login

    - #### setLogin

          public StompClientOptions setLogin(String login)

      Sets the login to use if the STOMP server is secured.
      Parameters:
        `login` - the login
      Returns:
        the current `StompClientOptions`

    - #### getPasscode

          public String getPasscode()

      Gets the configured passcode.
      Returns:
        the passcode

    - #### setPasscode

          public StompClientOptions setPasscode(String passcode)

      Sets the passcode to use if the STOMP server is secured.
      Parameters:
        `passcode` - the passcode
      Returns:
        the current `StompClientOptions`

    - #### getPort

          public int getPort()

      Gets the STOMP server port.
      Returns:
        the port

    - #### setPort

          public StompClientOptions setPort(int port)

      Sets the STOMP server port. `61613` by default.
      Parameters:
        `port` - the port
      Returns:
        the current `StompClientOptions`

    - #### getAcceptedVersions

          public List<String> getAcceptedVersions()

      Gets the list of STOMP protocol versions accepted by the client.
      Returns:
        the list of accepted version

    - #### setAcceptedVersions

          public StompClientOptions setAcceptedVersions(List<String> acceptedVersions)

      Sets the list of STOMP protocol versions accepted by the client. The list must be ordered from the lowest version to the highest. By default the following list is used: `1.0, 1.1, 1.2`
      Parameters:
        `acceptedVersions` - the order list of accepted versions
      Returns:
        the current `StompClientOptions`

    - #### isAutoComputeContentLength

          public boolean isAutoComputeContentLength()

      Whether or not the automatic computation of the `content-length` header is enabled.
      Returns:
        whether or not the option is enabled

    - #### setAutoComputeContentLength

          public StompClientOptions setAutoComputeContentLength(boolean autoComputeContentLength)

      Sets whether or not the automatic computation of the `content-length` header is enabled. If enabled, the `content-length` header is set in all frame with a body that do not explicitly set the header. The option is enabled by default.
      Parameters:
        `autoComputeContentLength` - `true` to enable the option, `false` to disable it.
      Returns:
        the current `StompClientOptions`

    - #### isUseStompFrame

          public boolean isUseStompFrame()

      Checks whether or not the connection is made using the `STOMP` command instead of the `CONNECT` command. The `STOMP` command has been introduced in the 1.2 version of the protocol to ease the network analysis (as `CONNECT` is also used by HTTP. To be compliant with server not implementing the 1.2 specification, this option should be disabled.
      Returns:
        whether or not the option is enabled

    - #### setUseStompFrame

          public StompClientOptions setUseStompFrame(boolean useStompFrame)

      Sets whether or not the connection is made using the `STOMP` command instead of the `CONNECT` command. The `STOMP` command has been introduced in the 1.2 version of the protocol to ease the network analysis (as `CONNECT` is also used by HTTP. To be compliant with server not implementing the 1.2 specification, this option should be disabled. This option is disabled by default.
      Parameters:
        `useStompFrame` - `true` to enable the option, `false` to disable it.
      Returns:
        the current `StompClientOptions`

    - #### setSsl

          public StompClientOptions setSsl(boolean ssl)

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

    - #### isBypassHostHeader

          public boolean isBypassHostHeader()

      Checks whether or not the `host` header must be dropped from the `CONNECT/STOMP` frame. Server may be picky about this header (such as RabbitMQ that does not support it).
      Returns:
        whether or not the option is enabled

    - #### setBypassHostHeader

          public StompClientOptions setBypassHostHeader(boolean bypassHostHeader)

      Sets whether or not the `host` header must be dropped from the `CONNECT/STOMP` frame. Server may be picky about this header (such as RabbitMQ that does not support it). Options disabled by default.
      Parameters:
        `bypassHostHeader` - `true` to enable the option, `false` to disable it.
      Returns:
        the current `StompClientOptions`

    - #### getHeartbeat

          public JsonObject getHeartbeat()

      Gets the heartbeat configuration.
      Returns:
        the heartbeat configuration
      See Also:
        `Frame.Heartbeat`

    - #### setHeartbeat

          public StompClientOptions setHeartbeat(JsonObject heartbeat)

      Sets the heartbeat configuration.
      Parameters:
        `heartbeat` - the configuration
      Returns:
        the current `StompClientOptions`
      See Also:
        `Frame.Heartbeat`

Copyright © 2015. All rights reserved.