Package org. hildan. krossbow. stomp. conversions
Types
Link copied to clipboard
A StompSession with additional methods to serialize/deserialize message bodies based on a KClass.
Functions
Link copied to clipboard
inline suspend fun <T> TypedStompSession.convertAndSend(destination: String, body: T): StompReceipt?
Content copied to clipboard
Sends a SEND frame to the server at the given destination with the given body, converted appropriately.
inline suspend fun <T> TypedStompSession.convertAndSend(headers: StompSendHeaders, body: T): StompReceipt?
Content copied to clipboard
Link copied to clipboard
inline suspend fun <T> TypedStompSession.subscribe(destination: String): Flow<T>
Content copied to clipboard
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.