public class Reactor2TcpStompClient extends StompClientSupport
Reactor2TcpClient
.Constructor and Description |
---|
Reactor2TcpStompClient()
Create an instance with host "127.0.0.1" and port 61613.
|
Reactor2TcpStompClient(String host,
int port)
Create an instance with the given host and port.
|
Reactor2TcpStompClient(TcpOperations<byte[]> tcpClient)
Create an instance with a pre-configured TCP client.
|
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.
|
createSession, getDefaultHeartbeat, getMessageConverter, getReceiptTimeLimit, getTaskScheduler, isDefaultHeartbeatEnabled, processConnectHeaders, setDefaultHeartbeat, setMessageConverter, setReceiptTimeLimit, setTaskScheduler
public Reactor2TcpStompClient()
public Reactor2TcpStompClient(String host, int port)
host
- the hostport
- the portpublic Reactor2TcpStompClient(TcpOperations<byte[]> tcpClient)
tcpClient
- the client to usepublic ListenableFuture<StompSession> connect(StompSessionHandler handler)
StompSessionHandler
when connected
on the STOMP level.handler
- the handler for the STOMP sessionpublic ListenableFuture<StompSession> connect(StompHeaders connectHeaders, StompSessionHandler handler)
connect(StompSessionHandler)
that
accepts headers to use for the STOMP CONNECT frame.connectHeaders
- headers to add to the CONNECT framehandler
- the handler for the STOMP sessionpublic void shutdown()