open class StompHeaderAccessor : SimpMessageHeaderAccessor
A MessageHeaderAccessor to use when creating a Message from a decoded STOMP frame, or when encoding a Message to a STOMP frame.
When created from STOMP frame content, the actual STOMP headers are stored in the native header sub-map managed by the parent class org.springframework.messaging.support.NativeMessageHeaderAccessor while the parent class SimpMessageHeaderAccessor manages common processing headers some of which are based on STOMP headers (e.g. destination, content-type, etc).
An instance of this class can also be created by wrapping an existing Message. That message may have been created with the more generic org.springframework.messaging.simp.SimpMessageHeaderAccessor in which case STOMP headers are created from common processing headers. In this case it is also necessary to invoke either #updateStompCommandAsClientMessage() or #updateStompCommandAsServerMessage() if sending a message and depending on whether a message is sent to a client or the message broker.
Author
Rossen Stoyanchev
Since
4.0
static val STOMP_ACCEPT_VERSION_HEADER: String |
|
static val STOMP_ACK_HEADER: String |
|
static val STOMP_CONTENT_LENGTH_HEADER: String |
|
static val STOMP_CONTENT_TYPE_HEADER: String |
|
static val STOMP_DESTINATION_HEADER: String |
|
static val STOMP_HEARTBEAT_HEADER: String |
|
static val STOMP_HOST_HEADER: String |
|
static val STOMP_ID_HEADER: String |
|
static val STOMP_LOGIN_HEADER: String |
|
static val STOMP_MESSAGE_HEADER: String |
|
static val STOMP_MESSAGE_ID_HEADER: String |
|
static val STOMP_NACK_HEADER: String |
|
static val STOMP_PASSCODE_HEADER: String |
|
static val STOMP_RECEIPT_HEADER: String |
|
static val STOMP_RECEIPT_ID_HEADER: String |
|
static val STOMP_SUBSCRIPTION_HEADER: String |
|
static val STOMP_VERSION_HEADER: String |
open static fun create(command: StompCommand): StompHeaderAccessor
Create an instance for the given STOMP command. open static fun create(command: StompCommand, headers: MutableMap<String, MutableList<String>>): StompHeaderAccessor
Create an instance for the given STOMP command and headers. |
|
open static fun createForHeartbeat(): StompHeaderAccessor
Create headers for a heartbeat. While a STOMP heartbeat frame does not have headers, a session id is needed for processing purposes at a minimum. |
|
open fun getAcceptVersion(): MutableSet<String> |
|
open fun getAck(): String |
|
open fun getCommand(): StompCommand
Return the STOMP command, or open static fun getCommand(headers: MutableMap<String, Any>): StompCommand
Return the STOMP command from the given headers, or |
|
open fun getContentLength(): Intopen static fun getContentLength(nativeHeaders: MutableMap<String, MutableList<String>>): Int |
|
open fun getDetailedLogMessage(payload: Any): String |
|
open fun getHeartbeat(): LongArray |
|
open fun getHost(): String |
|
open fun getLogin(): String |
|
open fun getMessage(): String |
|
open fun getMessageId(): String |
|
open fun getNack(): String |
|
open fun getPasscode(): Stringopen static fun getPasscode(headers: MutableMap<String, Any>): String
Return the passcode header value, or |
|
open fun getReceipt(): String |
|
open fun getReceiptId(): String |
|
open fun getShortLogMessage(payload: Any): String |
|
open fun getVersion(): String |
|
open fun isHeartbeat(): Boolean |
|
open fun setAcceptVersion(acceptVersion: String): Unit |
|
open fun setAck(ack: String): Unit |
|
open fun setContentLength(contentLength: Int): Unit |
|
open fun setContentType(contentType: MimeType): Unit |
|
open fun setDestination(destination: String): Unit |
|
open fun setHeartbeat(cx: Long, cy: Long): Unit |
|
open fun setHost(host: String): Unit |
|
open fun setLogin(login: String): Unit |
|
open fun setMessage(content: String): Unit |
|
open fun setMessageId(id: String): Unit |
|
open fun setNack(nack: String): Unit |
|
open fun setPasscode(passcode: String): Unit |
|
open fun setReceipt(receiptId: String): Unit |
|
open fun setReceiptId(receiptId: String): Unit |
|
open fun setSubscriptionId(subscriptionId: String): Unit |
|
open fun setVersion(version: String): Unit |
|
open fun updateStompCommandAsClientMessage(): StompCommand |
|
open fun updateStompCommandAsServerMessage(): Unit |
|
open static fun wrap(message: Message<*>): StompHeaderAccessor
Create an instance from the payload and headers of the given Message. |