public final class MessageHeaders extends Object implements Map<String,Object>, Serializable
Message
.UnsupportedOperationException
To create MessageHeaders instance use fluent MessageBuilder API
MessageBuilder.withPayload("foo").setHeader("key1", "value1").setHeader("key2", "value2");or create an instance of GenericMessage passing payload as
Object
and headers as a regular Map
Map headers = new HashMap(); headers.put("key1", "value1"); headers.put("key2", "value2"); new GenericMessage("foo", headers);
Modifier and Type | Class and Description |
---|---|
static class |
MessageHeaders.AlternativeJdkIdGenerator
A variation of
UUID.randomUUID() that uses SecureRandom only for
the initial seed and Random thereafter, which provides better performance
in exchange for less securely random id's. |
static interface |
MessageHeaders.IdGenerator |
static class |
MessageHeaders.JdkIdGenerator |
static class |
MessageHeaders.SimpleIncrementingIdGenerator |
Modifier and Type | Field and Description |
---|---|
static String |
CONTENT_TYPE |
static String |
CORRELATION_ID |
static String |
ERROR_CHANNEL |
static String |
EXPIRATION_DATE |
static String |
ID
The key for the Message ID.
|
static String |
POSTPROCESS_RESULT |
static String |
PRIORITY |
static String |
REPLY_CHANNEL |
static String |
SEQUENCE_DETAILS |
static String |
SEQUENCE_NUMBER |
static String |
SEQUENCE_SIZE |
static String |
TIMESTAMP |
Constructor and Description |
---|
MessageHeaders(Map<String,Object> headers) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Since MessageHeaders are immutable the call to this method will result in
UnsupportedOperationException |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<String,Object>> |
entrySet() |
boolean |
equals(Object object) |
Object |
get(Object key) |
<T> T |
get(Object key,
Class<T> type) |
Object |
getCorrelationId() |
Object |
getErrorChannel() |
Long |
getExpirationDate() |
UUID |
getId() |
Integer |
getPriority() |
Object |
getReplyChannel() |
Integer |
getSequenceNumber() |
Integer |
getSequenceSize() |
Long |
getTimestamp() |
int |
hashCode() |
boolean |
isEmpty() |
Set<String> |
keySet() |
Object |
put(String key,
Object value)
Since MessageHeaders are immutable the call to this method will result in
UnsupportedOperationException |
void |
putAll(Map<? extends String,? extends Object> t)
Since MessageHeaders are immutable the call to this method will result in
UnsupportedOperationException |
Object |
remove(Object key)
Since MessageHeaders are immutable the call to this method will result in
UnsupportedOperationException |
int |
size() |
String |
toString() |
Collection<Object> |
values() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
public static final String ID
public static final String TIMESTAMP
public static final String CORRELATION_ID
public static final String REPLY_CHANNEL
public static final String ERROR_CHANNEL
public static final String EXPIRATION_DATE
public static final String PRIORITY
public static final String SEQUENCE_NUMBER
public static final String SEQUENCE_SIZE
public static final String SEQUENCE_DETAILS
public static final String CONTENT_TYPE
public static final String POSTPROCESS_RESULT
public UUID getId()
public Long getTimestamp()
public Long getExpirationDate()
public Object getCorrelationId()
public Object getReplyChannel()
public Object getErrorChannel()
public Integer getSequenceNumber()
public Integer getSequenceSize()
public Integer getPriority()
public int hashCode()
public boolean equals(Object object)
public boolean containsKey(Object key)
containsKey
in interface Map<String,Object>
public boolean containsValue(Object value)
containsValue
in interface Map<String,Object>
public Object put(String key, Object value)
UnsupportedOperationException
public void putAll(Map<? extends String,? extends Object> t)
UnsupportedOperationException
public Object remove(Object key)
UnsupportedOperationException
public void clear()
UnsupportedOperationException
Copyright © 2017. All rights reserved.