open class StompDecoder
Decodes one or more STOMP frames contained in a ByteBuffer.
An attempt is made to read all complete STOMP frames from the buffer, which could be zero, one, or more. If there is any left-over content, i.e. an incomplete STOMP frame, at the end the buffer is reset to point to the beginning of the partial content. The caller is then responsible for dealing with that incomplete content by buffering until there is more input available.
Author
Andy Wilkinson
Author
Rossen Stoyanchev
Since
4.0
StompDecoder()
Decodes one or more STOMP frames contained in a ByteBuffer. An attempt is made to read all complete STOMP frames from the buffer, which could be zero, one, or more. If there is any left-over content, i.e. an incomplete STOMP frame, at the end the buffer is reset to point to the beginning of the partial content. The caller is then responsible for dealing with that incomplete content by buffering until there is more input available. |
open fun decode(byteBuffer: ByteBuffer): MutableList<Message<ByteArray>>
Decodes one or more STOMP frames from the given open fun decode(byteBuffer: ByteBuffer, partialMessageHeaders: MultiValueMap<String, String>): MutableList<Message<ByteArray>>
Decodes one or more STOMP frames from the given If the given ByteBuffer contains only partial STOMP frame content and no complete STOMP frames, an empty list is returned, and the buffer is reset to to where it was. If the buffer contains one ore more STOMP frames, those are returned and the buffer reset to point to the beginning of the unused partial content. The output partialMessageHeaders map is used to store successfully parsed headers in case of partial content. The caller can then check if a "content-length" header was read, which helps to determine how much more content is needed before the next attempt to decode. |
|
open fun getHeaderInitializer(): MessageHeaderInitializer
Return the configured |
|
open fun setHeaderInitializer(headerInitializer: MessageHeaderInitializer): Unit
Configure a MessageHeaderInitializer to apply to the headers of Messages from decoded STOMP frames. |