|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.camel.impl.MessageSupport
public abstract class MessageSupport
A base class for implementation inheritence providing the core Message body
handling features but letting the derived class deal with headers.
Unless a specific provider wishes to do something particularly clever with headers you probably
want to just derive from DefaultMessage
| Constructor Summary | |
|---|---|
MessageSupport()
|
|
| Method Summary | ||
|---|---|---|
Message |
copy()
Creates a copy of this message so that it can be used and possibly modified further in another exchange |
|
protected Object |
createBody()
A factory method to allow a provider to lazily create the message body for inbound messages from other sources |
|
Object |
getBody()
Returns the body of the message as a POJO |
|
|
getBody(Class<T> type)
Returns the body as the specified type |
|
Exchange |
getExchange()
Returns the exchange this message is related to |
|
String |
getMessageId()
|
|
abstract Message |
newInstance()
Returns a new instance |
|
void |
setBody(Object body)
Sets the body of the message |
|
|
setBody(Object body,
Class<T> type)
Sets the body of the message as a specific type |
|
void |
setExchange(Exchange exchange)
|
|
void |
setMessageId(String messageId)
set the id of the message |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.camel.Message |
|---|
getHeader, getHeader, getHeaders, setHeader, setHeaders |
| Constructor Detail |
|---|
public MessageSupport()
| Method Detail |
|---|
public Object getBody()
Message
getBody in interface Messagepublic <T> T getBody(Class<T> type)
Message
getBody in interface Messagetype - the type that the body
public void setBody(Object body)
Message
setBody in interface Message
public <T> void setBody(Object body,
Class<T> type)
Message
setBody in interface Messagepublic Message copy()
Message
copy in interface Messagepublic Exchange getExchange()
Message
getExchange in interface Messagepublic void setExchange(Exchange exchange)
public abstract Message newInstance()
protected Object createBody()
public String getMessageId()
getMessageId in interface Messagepublic void setMessageId(String messageId)
Message
setMessageId in interface MessagemessageId - the messageId to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||