|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Message
Implements the Message pattern and
represents an inbound or outbound message as part of an Exchange
Method Summary | ||
---|---|---|
Message |
copy()
Creates a copy of this message so that it can be used and possibly modified further in another exchange |
|
void |
copyFrom(Message message)
Copies the contents of the other message into this message |
|
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 |
|
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 |
|
String |
getMessageId()
Returns the id of the message |
|
Object |
removeHeader(String name)
Removes the named header from this message |
|
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 |
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 |
|
void |
setMessageId(String messageId)
Sets the id of the message |
Method Detail |
---|
String getMessageId()
void setMessageId(String messageId)
messageId
- Exchange getExchange()
Object getHeader(String name)
name
- name of header
<T> T getHeader(String name, Class<T> type)
name
- the name of the headertype
- the type of the header
void setHeader(String name, Object value)
name
- of the headervalue
- to associate with the nameObject removeHeader(String name)
name
-
Map<String,Object> getHeaders()
void setHeaders(Map<String,Object> headers)
headers
- Object getBody()
<T> T getBody(Class<T> type)
type
- the type that the body
void setBody(Object body)
<T> void setBody(Object body, Class<T> type)
Message copy()
void copyFrom(Message message)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |