|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MuleMessage
MuleMessage
represents a message payload. The Message comprises of
the payload itself and properties associated with the payload.
Method Summary | |
---|---|
void |
applyTransformers(List transformers)
Will apply a list of transformers to the payload of the message. |
void |
applyTransformers(List transformers,
Class outputType)
Will apply a list of transformers to the payload of the message. |
MessageAdapter |
getAdapter()
Returns the currently edited Message adapter for this message. |
Object |
getOrginalPayload()
Returns the original payload used to create this message. |
MessageAdapter |
getOriginalAdapter()
Returns the original payload used to create this message. |
Object |
getPayload(Class outputType)
Will attempt to obtain the payload of this message with the desired Class type. |
byte[] |
getPayloadAsBytes()
Converts the message implementation into a byte array representation |
String |
getPayloadAsString()
Converts the message implementation into a String representation. |
String |
getPayloadAsString(String encoding)
Converts the message implementation into a String representation |
void |
setPayload(Object payload)
Update the message payload. |
Method Detail |
---|
MessageAdapter getAdapter()
getOriginalAdapter()
MessageAdapter getOriginalAdapter()
applyTransformers(java.util.List)
or
applyTransformers(java.util.List, Class)
is called.
void applyTransformers(List transformers) throws TransformerException
transformers
- the transformers to apply to the message payload
TransformerException
- if a transformation error occurs or one or more of the transformers passed in a
are incompatible with the message payloadvoid applyTransformers(List transformers, Class outputType) throws TransformerException
transformers
- the transformers to apply to the message payloadoutputType
- the required output type for this transformation. by adding this parameter some additional
transformations will occur on the message payload to ensure that the final payload is of the specified type.
If no transformers can be found in the registry that can transform from the return type of the transformation
list to the outputType and exception will be thrown
TransformerException
- if a transformation error occurs or one or more of the transformers passed in a
are incompatible with the message payloadvoid setPayload(Object payload)
payload
- the object to assign as the message payloadObject getPayload(Class outputType) throws TransformerException
outputType
- the desired return type
TransformerException
- if a transformer cannot be found or there is an error during transformation of the
payloadString getPayloadAsString(String encoding) throws Exception
encoding
- The encoding to use when transforming the message (if
necessary). The parameter is used when converting from a byte array
Exception
- Implementation may throw an endpoint specific exceptionString getPayloadAsString() throws Exception
Exception
- Implementation may throw an endpoint specific exceptionbyte[] getPayloadAsBytes() throws Exception
Exception
- Implemetation may throw an endpoint specific exceptionObject getOrginalPayload()
applyTransformers(java.util.List)
or
applyTransformers(java.util.List, Class)
is called.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |