ConnectionHandlingStompSession.
| Modifier and Type | Class and Description |
|---|---|
| private class | |
| private class | |
| private class | |
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private volatile boolean | |
| private volatile boolean | |
| private final StompHeaders | |
| private volatile TcpConnection | |
| private MessageConverter | |
| public static final byte[] | EMPTY_PAYLOAD
An empty payload. |
| private static final Message | |
| private static final long | |
| private static final IdGenerator | |
| private static final Log | |
| private final Map | |
| private final AtomicInteger | |
| private long | |
| private final CompletableFuture | |
| private final StompSessionHandler | |
| private final String | |
| private final AtomicInteger | |
| private final Map | |
| private TaskScheduler | |
| private volatile String |
| Access | Constructor and Description |
|---|---|
| public | DefaultStompSession(StompSessionHandler
the application handler for the session sessionHandler, StompHeaders headers for the STOMP CONNECT frame connectHeaders)Create a new session. |
| Modifier and Type | Method and Description |
|---|---|
| public StompSession. | acknowledge(String
the id of the message messageId, boolean whether the message was consumed or not consumed)Implements org. Send an acknowledgement whether a message was consumed or not resulting in an ACK or NACK frame respectively. |
| public StompSession. | acknowledge(StompHeaders
the headers for the ACK or NACK message frame headers, boolean whether the message was consumed or not consumed)Implements org. An overloaded version of |
| public void | afterConnected(TcpConnection<byte[]>
the connection connection)Implements org. Invoked after a connection is successfully established. |
| public void | afterConnectFailure(Throwable
the exception ex)Implements org. Invoked on failure to connect. |
| public void | afterConnectionClosed()
Implements org. Invoked after the connection is closed. |
| private String | |
| private StompHeaderAccessor | |
| private Message | |
| public void | disconnect()
Implements org. Disconnect the session by sending a DISCONNECT frame. |
| public void | disconnect(StompHeaders
the headers for the disconnect message frame headers)Implements org. Variant of |
| private void | |
| public StompHeaderAccessor | getConnectHeaders()
Implements org. Return the headers that will be sent in the STOMP CONNECT frame. |
| public MessageConverter | |
| public long | |
| public CompletableFuture | getSession()
Implements org. Return a future that will complete when the session is ready for use. |
| public StompSessionHandler | |
| public String | getSessionId()
Implements org. Return the id for the session. |
| public TaskScheduler | |
| public void | handleFailure(Throwable
the exception ex)Implements org. Handle a failure on the connection. |
| public void | handleMessage(Message<byte[]>
the message message)Implements org. Handle a message received from the remote host. |
| private void | |
| private void | |
| public boolean | |
| public boolean | isConnected()
Implements org. Whether the session is connected. |
| private void | |
| public StompSession. | send(String
the destination to send a message to destination, Object the message payload payload)Implements org. Send a message to the specified destination, converting the payload to a
|
| public StompSession. | send(StompHeaders
the message headers headers, Object the message payload payload)Implements org. An overloaded version of |
| public void | setAutoReceipt(boolean autoReceiptEnabled)
Implements org. When enabled, a receipt header is automatically added to future
|
| public void | setMessageConverter(MessageConverter
the message converter to use messageConverter)Set the |
| public void | setReceiptTimeLimit(long receiptTimeLimit)
Configure the time in milliseconds before a receipt expires. |
| public void | setTaskScheduler(TaskScheduler taskScheduler)
Configure the TaskScheduler to use for receipt tracking. |
| public StompSession. | subscribe(String
the destination to subscribe to destination, StompFrameHandler the handler for received messages handler)Implements org. Subscribe to the given destination by sending a SUBSCRIBE frame and handle
received messages with the specified |
| public StompSession. | subscribe(StompHeaders
the headers for the subscribed message frame headers, StompFrameHandler the handler for received messages handler)Implements org. An overloaded version of |
| private void |