|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.camel.impl.MessageSupport
org.apache.camel.impl.DefaultMessage
public class DefaultMessage
The default implementation of Message
Constructor Summary | |
---|---|
DefaultMessage()
|
Method Summary | ||
---|---|---|
protected Map<String,Object> |
createHeaders()
A factory method to lazily create the headers to make it easy to create efficient Message implementations which only construct and populate the Map on demand |
|
Object |
getHeader(String name)
Accesses a specific header |
|
|
getHeader(String name,
Class<T> type)
Returns a header associated with this message by name and specifying the type required |
|
Map<String,Object> |
getHeaders()
Returns all of the headers associated with the message |
|
DefaultMessage |
newInstance()
Returns a new instance |
|
protected void |
populateInitialHeaders(Map<String,Object> map)
A strategy method populate the initial set of headers on an inbound message from an underlying binding |
|
void |
setHeader(String name,
Object value)
Sets a header on the message |
|
void |
setHeaders(Map<String,Object> headers)
Set all the headers associated with this message |
|
String |
toString()
|
Methods inherited from class org.apache.camel.impl.MessageSupport |
---|
copy, createBody, getBody, getBody, getExchange, getMessageId, setBody, setBody, setExchange, setMessageId |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DefaultMessage()
Method Detail |
---|
public String toString()
toString
in class Object
public Object getHeader(String name)
Message
public <T> T getHeader(String name, Class<T> type)
Message
name
- the name of the headertype
- the type of the header
public void setHeader(String name, Object value)
Message
name
- of the headervalue
- to associate with the namepublic Map<String,Object> getHeaders()
Message
public void setHeaders(Map<String,Object> headers)
Message
public DefaultMessage newInstance()
MessageSupport
newInstance
in class MessageSupport
protected Map<String,Object> createHeaders()
protected void populateInitialHeaders(Map<String,Object> map)
map
- is the empty header map to populate
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |