StompHeaders

Represents STOMP frame headers.

<p>In addition to the normal methods defined by {@link Map}, this class offers the following convenience methods: <ul> <li>{@link #getFirst(string)} return the first value for a header name</li> <li>{@link #add(string, string)} add to the list of values for a header name</li> <li>{@link #set(string, string)} set a header name to a single string value</li> </ul>

@author Rossen Stoyanchev @since 4.2 @see <a href="http://stomp.github.io/stomp-specification-1.2.html#Frames_and_Headers"> http://stomp.github.io/stomp-specification-1.2.html#Frames_and_Headers</a>

class StompHeaders : MultiValueMap!(string, string) {}

Constructors

this
this()

Create a new instance to be populated with new header values.

Members

Functions

add
void add(string headerName, string headerValue)

Add the given, single header value under the given name. @param headerName the header name @param headerValue the header value @throws UnsupportedOperationException if adding headers is not supported @see #put(string, List) @see #set(string, string)

addAll
void addAll(string headerName, List!(string) headerValues)
Undocumented in source. Be warned that the author may not have intended to support it.
addAll
void addAll(MultiStringsMap values)
Undocumented in source. Be warned that the author may not have intended to support it.
byKey
InputRange!string byKey()
Undocumented in source. Be warned that the author may not have intended to support it.
byValue
InputRange!(List!(string)) byValue()
Undocumented in source. Be warned that the author may not have intended to support it.
clear
void clear()
Undocumented in source. Be warned that the author may not have intended to support it.
containsKey
bool containsKey(string key)
Undocumented in source. Be warned that the author may not have intended to support it.
containsValue
bool containsValue(List!(string) value)
Undocumented in source. Be warned that the author may not have intended to support it.
get
List!(string) get(string key)
Undocumented in source. Be warned that the author may not have intended to support it.
getAcceptVersion
string[] getAcceptVersion()

Get the accept-version header. @since 5.0.7

getAck
string getAck()

Get the ack header.

getContentLength
long getContentLength()

Return the content-length header or -1 if unknown.

getContentType
AcceptMimeType[] getContentType()

Return the content-type header value.

getDestination
string getDestination()

Get the destination header. Applies to the SEND, SUBSCRIBE, and MESSAGE frames.

getFirst
string getFirst(string headerName)

Return the first header value for the given header name, if any. @param headerName the header name @return the first header value, or {@code null} if none

getHeartbeat
long[] getHeartbeat()

Get the heartbeat header.

getHost
string getHost()

Get the host header.

getId
string getId()

Get the id header.

getLogin
string getLogin()

Get the login header.

getMessageId
string getMessageId()

Get the message-id header.

getPasscode
string getPasscode()

Get the passcode header.

getReceipt
string getReceipt()

Get the receipt header.

getReceiptId
string getReceiptId()

Get the receipt header.

getServer
string getServer()

Get the server header. Applies to the CONNECTED frame.

getSession
string getSession()

Get the session header.

getSubscription
string getSubscription()

Get the subscription header.

isEmpty
bool isEmpty()
Undocumented in source. Be warned that the author may not have intended to support it.
isHeartbeatEnabled
bool isHeartbeatEnabled()

Whether heartbeats are enabled. Returns {@code false} if {@link #setHeartbeat} is set to "0,0", and {@code true} otherwise.

opApply
int opApply(int delegate(ref string, ref List!(string)) dg)
Undocumented in source. Be warned that the author may not have intended to support it.
opApply
int opApply(int delegate(MapEntry!(string, List!(string)) entry) dg)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(IObject o)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(Object other)
Undocumented in source. Be warned that the author may not have intended to support it.
opIndex
List!(string) opIndex(string key)
Undocumented in source. Be warned that the author may not have intended to support it.
put
List!(string) put(string key, List!(string) value)
Undocumented in source. Be warned that the author may not have intended to support it.
putAll
void putAll(MultiStringsMap map)
Undocumented in source. Be warned that the author may not have intended to support it.
putIfAbsent
List!(string) putIfAbsent(string key, List!(string) value)
Undocumented in source. Be warned that the author may not have intended to support it.
remove
List!(string) remove(string key)
Undocumented in source. Be warned that the author may not have intended to support it.
remove
bool remove(string key, List!(string) value)
Undocumented in source. Be warned that the author may not have intended to support it.
replace
bool replace(string key, List!(string) oldValue, List!(string) newValue)
Undocumented in source. Be warned that the author may not have intended to support it.
replace
List!(string) replace(string key, List!(string) value)
Undocumented in source. Be warned that the author may not have intended to support it.
set
void set(string headerName, string headerValue)

Set the given, single header value under the given name. @param headerName the header name @param headerValue the header value @throws UnsupportedOperationException if adding headers is not supported @see #put(string, List) @see #add(string, string)

setAcceptVersion
void setAcceptVersion(string[] acceptVersions)

Set the accept-version header. Must be one of "1.1", "1.2", or both. Applies to the CONNECT frame. @since 5.0.7

setAck
void setAck(string ack)

Set the ack header to one of "auto", "client", or "client-individual". Applies to the SUBSCRIBE and MESSAGE frames.

setAll
void setAll(Map!(string, string) values)
Undocumented in source. Be warned that the author may not have intended to support it.
setContentLength
void setContentLength(long contentLength)

Set the content-length header. Applies to the SEND, MESSAGE, and ERROR frames.

setContentType
void setContentType(MimeType mimeType)

Set the content-type header. Applies to the SEND, MESSAGE, and ERROR frames.

setDestination
void setDestination(string destination)

Set the destination header.

setHeartbeat
void setHeartbeat(long[] heartbeat)

Set the heartbeat header. Applies to the CONNECT and CONNECTED frames.

setHost
void setHost(string host)

Set the host header. Applies to the CONNECT frame.

setId
void setId(string id)

Set the id header. Applies to the SUBSCR0BE, UNSUBSCRIBE, and ACK or NACK frames.

setLogin
void setLogin(string login)

Set the login header. Applies to the CONNECT frame.

setMessageId
void setMessageId(string messageId)

Set the message-id header. Applies to the MESSAGE frame.

setPasscode
void setPasscode(string passcode)

Set the passcode header. Applies to the CONNECT frame.

setReceipt
void setReceipt(string receipt)

Set the receipt header. Applies to any client frame other than CONNECT.

setReceiptId
void setReceiptId(string receiptId)

Set the receipt-id header. Applies to the RECEIPT frame.

setServer
void setServer(string server)

Set the server header. Applies to the CONNECTED frame.

setSession
void setSession(string session)

Set the session header. Applies to the CONNECTED frame.

setSubscription
void setSubscription(string subscription)

Set the login header. Applies to the MESSAGE frame.

size
int size()
Undocumented in source. Be warned that the author may not have intended to support it.
toHash
size_t toHash()
Undocumented in source. Be warned that the author may not have intended to support it.
toSingleValueMap
Map!(string, string) toSingleValueMap()
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.
values
List!(string)[] values()
Undocumented in source. Be warned that the author may not have intended to support it.

Mixins

__anonymous
mixin CloneMemberTemplate!(typeof(this))
Undocumented in source.

Static functions

readOnlyStompHeaders
StompHeaders readOnlyStompHeaders(MultiStringsMap headers)

Return a {@code StompHeaders} object that can only be read, not written to.

Variables

ACCEPT_VERSION
enum string ACCEPT_VERSION;
Undocumented in source.
ACK
enum string ACK;
Undocumented in source.
CONTENT_LENGTH
enum string CONTENT_LENGTH;
Undocumented in source.
CONTENT_TYPE
enum string CONTENT_TYPE;
Undocumented in source.
DESTINATION
enum string DESTINATION;
Undocumented in source.
HEARTBEAT
enum string HEARTBEAT;
Undocumented in source.
HOST
enum string HOST;
Undocumented in source.
ID
enum string ID;
Undocumented in source.
LOGIN
enum string LOGIN;
Undocumented in source.
MESSAGE_ID
enum string MESSAGE_ID;
Undocumented in source.
PASSCODE
enum string PASSCODE;
Undocumented in source.
RECEIPT
enum string RECEIPT;
Undocumented in source.
RECEIPT_ID
enum string RECEIPT_ID;
Undocumented in source.
SERVER
enum string SERVER;
Undocumented in source.
SESSION
enum string SESSION;
Undocumented in source.
SUBSCRIPTION
enum string SUBSCRIPTION;
Undocumented in source.

Meta