public class MessageContext extends Object
| Constructor and Description |
|---|
MessageContext(Event event,
Event.Builder eventBuilder,
MuleContext muleContext) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getAttributes() |
org.mule.runtime.api.metadata.DataType |
getAttributesDataType() |
int |
getCorrelationGroupSize() |
String |
getCorrelationId() |
int |
getCorrelationSequence() |
org.mule.runtime.api.metadata.DataType |
getDataType() |
Map<String,DataHandler> |
getInboundAttachments() |
Map<String,Serializable> |
getInboundProperties() |
Map<String,DataHandler> |
getOutboundAttachments() |
Map<String,Serializable> |
getOutboundProperties() |
Object |
getPayload() |
<T> T |
payloadAs(Class<T> type)
Obtains the payload of the current message transformed to the given #type.
|
Object |
payloadAs(org.mule.runtime.api.metadata.DataType dataType)
Obtains the payload of the current message transformed to the given #dataType.
|
void |
setPayload(Object payload) |
String |
toString() |
public MessageContext(Event event, Event.Builder eventBuilder, MuleContext muleContext)
public String getCorrelationId()
public int getCorrelationSequence()
public int getCorrelationGroupSize()
public org.mule.runtime.api.metadata.DataType getDataType()
public Object getPayload()
public <T> T payloadAs(Class<T> type) throws TransformerException
type - the java type the payload is to be transformed toTransformerExceptionpublic Object payloadAs(org.mule.runtime.api.metadata.DataType dataType) throws TransformerException
dataType - the DatType to transform the current message payload toTransformerException - if there is an error during transformationpublic void setPayload(Object payload)
public Map<String,Serializable> getInboundProperties()
public Map<String,Serializable> getOutboundProperties()
public Map<String,DataHandler> getInboundAttachments()
public Map<String,DataHandler> getOutboundAttachments()
public Object getAttributes()
public org.mule.runtime.api.metadata.DataType getAttributesDataType()
Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.