Typed Stomp Session
A StompSession with additional methods to serialize/deserialize message bodies based on a KClass.
Functions
Sends an ABORT frame with the given transactionId.
Sends a BEGIN frame with the given transactionId.
Sends a COMMIT frame with the given transactionId.
Sends a SEND frame to the server at the given destination with the given body, converted appropriately.
If graceful disconnect is enabled (which is the default), sends a DISCONNECT frame to close the session, waits for the relevant RECEIPT frame, and then closes the connection. Otherwise, force-closes the connection.
Sends a SEND frame to the server at the given destination with the given binary body.
Sends a SEND frame to the server at the given destination without body.
Sends the given frame as-is, without modifications to its headers, regardless of the configuration.
Sends a SEND frame to the server at the given destination with the given textual body.
Subscribes and returns a Flow of MESSAGE frames that unsubscribes automatically when the collector is done or cancelled. The returned flow can be collected only once.
Subscribes and returns a Flow of messages of type T that unsubscribes automatically when the collector is done or cancelled. The returned flow can be collected only once.
Subscribes and returns a Flow of MESSAGE frames that unsubscribes automatically when the collector is done or cancelled. The returned flow can be collected only once.
Subscribes to the given destination and returns a Flow of messages of type T that unsubscribes automatically when the collector is done or cancelled. The returned flow can be collected only once.
Subscribes and returns a Flow of binary message bodies that unsubscribes automatically when the collector is done or cancelled. The returned flow can be collected only once.
Subscribes and returns a Flow of text message bodies that unsubscribes automatically when the collector is done or cancelled. The returned flow can be collected only once.
Wraps this StompSession to add methods that can convert message bodies using the provided converter.
Executes the given block as part of a transaction.