org.springframework.messaging.simp.stomp

## Class ReactorNettyTcpStompClient

- java.lang.Object
- - org.springframework.messaging.simp.stomp.StompClientSupport
  - - org.springframework.messaging.simp.stomp.ReactorNettyTcpStompClient

-     public class ReactorNettyTcpStompClient
      extends StompClientSupport

  A STOMP over TCP client that uses `ReactorNettyTcpClient`.
  Since:
    5.0
  Author:
    Rossen Stoyanchev

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ReactorNettyTcpStompClient()` Create an instance with host "127.0.0.1" and port 61613.
    `ReactorNettyTcpStompClient(String host, int port)` Create an instance with the given host and port.
    `ReactorNettyTcpStompClient(TcpOperations<byte[]> tcpClient)` Create an instance with a pre-configured TCP client.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ListenableFuture<StompSession>` | `connect(StompHeaders connectHeaders, StompSessionHandler handler)` An overloaded version of `connect(StompSessionHandler)` that accepts headers to use for the STOMP CONNECT frame.
    `ListenableFuture<StompSession>` | `connect(StompSessionHandler handler)` Connect and notify the given `StompSessionHandler` when connected on the STOMP level.
    `void` | `shutdown()` Shut down the client and release resources.
    `String` | `toString()`

    - ### Methods inherited from class org.springframework.messaging.simp.stomp.StompClientSupport

      `createSession, getDefaultHeartbeat, getMessageConverter, getReceiptTimeLimit, getTaskScheduler, isDefaultHeartbeatEnabled, processConnectHeaders, setDefaultHeartbeat, setMessageConverter, setReceiptTimeLimit, setTaskScheduler`

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

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

- - ### Constructor Detail

    - #### ReactorNettyTcpStompClient

          public ReactorNettyTcpStompClient()

      Create an instance with host "127.0.0.1" and port 61613.

    - #### ReactorNettyTcpStompClient

          public ReactorNettyTcpStompClient(String host,
                                            int port)

      Create an instance with the given host and port.
      Parameters:
        `host` - the host
        `port` - the port

    - #### ReactorNettyTcpStompClient

          public ReactorNettyTcpStompClient(TcpOperations<byte[]> tcpClient)

      Create an instance with a pre-configured TCP client.
      Parameters:
        `tcpClient` - the client to use

  - ### Method Detail

    - #### connect

          public ListenableFuture<StompSession> connect(StompSessionHandler handler)

      Connect and notify the given `StompSessionHandler` when connected on the STOMP level.
      Parameters:
        `handler` - the handler for the STOMP session
      Returns:
        a ListenableFuture for access to the session when ready for use

    - #### connect

          public ListenableFuture<StompSession> connect(@Nullable
                                                        StompHeaders connectHeaders,
                                                        StompSessionHandler handler)

      An overloaded version of `connect(StompSessionHandler)` that accepts headers to use for the STOMP CONNECT frame.
      Parameters:
        `connectHeaders` - headers to add to the CONNECT frame
        `handler` - the handler for the STOMP session
      Returns:
        a ListenableFuture for access to the session when ready for use

    - #### shutdown

          public void shutdown()

      Shut down the client and release resources.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`