|
Spring Integration | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.integration.MessageHeaders
public final class MessageHeaders
The headers for a Message
.
IMPORTANT: MessageHeaders are immutable. Any mutating operation (e.g., put(..), putAll(..) etc.)
will result in 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);
Nested Class Summary | |
---|---|
static interface |
MessageHeaders.IdGenerator
|
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Field Summary | |
---|---|
static java.lang.String |
CONTENT_TYPE
|
static java.lang.String |
CORRELATION_ID
|
static java.lang.String |
ERROR_CHANNEL
|
static java.lang.String |
EXPIRATION_DATE
|
static java.lang.String |
ID
The key for the Message ID. |
static java.lang.String |
POSTPROCESS_RESULT
|
static java.lang.String |
PRIORITY
|
static java.lang.String |
REPLY_CHANNEL
|
static java.lang.String |
SEQUENCE_DETAILS
|
static java.lang.String |
SEQUENCE_NUMBER
|
static java.lang.String |
SEQUENCE_SIZE
|
static java.lang.String |
TIMESTAMP
|
Constructor Summary | |
---|---|
MessageHeaders(java.util.Map<java.lang.String,java.lang.Object> headers)
|
Method Summary | ||
---|---|---|
void |
clear()
Since MessageHeaders are immutable the call to this method will result in UnsupportedOperationException |
|
boolean |
containsKey(java.lang.Object key)
|
|
boolean |
containsValue(java.lang.Object value)
|
|
java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> |
entrySet()
|
|
boolean |
equals(java.lang.Object object)
|
|
java.lang.Object |
get(java.lang.Object key)
|
|
|
get(java.lang.Object key,
java.lang.Class<T> type)
|
|
java.lang.Object |
getCorrelationId()
|
|
java.lang.Object |
getErrorChannel()
|
|
java.lang.Long |
getExpirationDate()
|
|
java.util.UUID |
getId()
|
|
java.lang.Integer |
getPriority()
|
|
java.lang.Object |
getReplyChannel()
|
|
java.lang.Integer |
getSequenceNumber()
|
|
java.lang.Integer |
getSequenceSize()
|
|
java.lang.Long |
getTimestamp()
|
|
int |
hashCode()
|
|
boolean |
isEmpty()
|
|
java.util.Set<java.lang.String> |
keySet()
|
|
java.lang.Object |
put(java.lang.String key,
java.lang.Object value)
Since MessageHeaders are immutable the call to this method will result in UnsupportedOperationException |
|
void |
putAll(java.util.Map<? extends java.lang.String,? extends java.lang.Object> t)
Since MessageHeaders are immutable the call to this method will result in UnsupportedOperationException |
|
java.lang.Object |
remove(java.lang.Object key)
Since MessageHeaders are immutable the call to this method will result in UnsupportedOperationException |
|
int |
size()
|
|
java.lang.String |
toString()
|
|
java.util.Collection<java.lang.Object> |
values()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ID
public static final java.lang.String TIMESTAMP
public static final java.lang.String CORRELATION_ID
public static final java.lang.String REPLY_CHANNEL
public static final java.lang.String ERROR_CHANNEL
public static final java.lang.String EXPIRATION_DATE
public static final java.lang.String PRIORITY
public static final java.lang.String SEQUENCE_NUMBER
public static final java.lang.String SEQUENCE_SIZE
public static final java.lang.String SEQUENCE_DETAILS
public static final java.lang.String CONTENT_TYPE
public static final java.lang.String POSTPROCESS_RESULT
Constructor Detail |
---|
public MessageHeaders(java.util.Map<java.lang.String,java.lang.Object> headers)
Method Detail |
---|
public java.util.UUID getId()
public java.lang.Long getTimestamp()
public java.lang.Long getExpirationDate()
public java.lang.Object getCorrelationId()
public java.lang.Object getReplyChannel()
public java.lang.Object getErrorChannel()
public java.lang.Integer getSequenceNumber()
public java.lang.Integer getSequenceSize()
public java.lang.Integer getPriority()
public <T> T get(java.lang.Object key, java.lang.Class<T> type)
public int hashCode()
hashCode
in interface java.util.Map<java.lang.String,java.lang.Object>
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object object)
equals
in interface java.util.Map<java.lang.String,java.lang.Object>
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public boolean containsKey(java.lang.Object key)
containsKey
in interface java.util.Map<java.lang.String,java.lang.Object>
public boolean containsValue(java.lang.Object value)
containsValue
in interface java.util.Map<java.lang.String,java.lang.Object>
public java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> entrySet()
entrySet
in interface java.util.Map<java.lang.String,java.lang.Object>
public java.lang.Object get(java.lang.Object key)
get
in interface java.util.Map<java.lang.String,java.lang.Object>
public boolean isEmpty()
isEmpty
in interface java.util.Map<java.lang.String,java.lang.Object>
public java.util.Set<java.lang.String> keySet()
keySet
in interface java.util.Map<java.lang.String,java.lang.Object>
public int size()
size
in interface java.util.Map<java.lang.String,java.lang.Object>
public java.util.Collection<java.lang.Object> values()
values
in interface java.util.Map<java.lang.String,java.lang.Object>
public java.lang.Object put(java.lang.String key, java.lang.Object value)
UnsupportedOperationException
put
in interface java.util.Map<java.lang.String,java.lang.Object>
public void putAll(java.util.Map<? extends java.lang.String,? extends java.lang.Object> t)
UnsupportedOperationException
putAll
in interface java.util.Map<java.lang.String,java.lang.Object>
public java.lang.Object remove(java.lang.Object key)
UnsupportedOperationException
remove
in interface java.util.Map<java.lang.String,java.lang.Object>
public void clear()
UnsupportedOperationException
clear
in interface java.util.Map<java.lang.String,java.lang.Object>
|
Spring Integration | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |