org.mule.el.context
Class MessageContext

java.lang.Object
  extended by org.mule.el.context.MessageContext

public class MessageContext
extends Object

Exposes information about the current Mule message:

  • id The unique message id
  • rootId The root message id. The id of the message before being split into parts. If was is not split then this value is the same as the id.
  • correlationId The message correlationId.
  • correlationSequence The message correlation sequence number.
  • correlationGroupSize The message correlation group size.
  • dataType The message data type (org.mule.api.transformer.DataType).
  • replyTo The message reply to destination. (mutable)
  • payload The message payload (mutable). You can also use message.payloadAs(Class clazz).
  • inboundProperties Map of inbound message properties (immutable).
  • outboundProperties Map of outbound message properties.
  • inboundAttachements Map of inbound message attachments (immutable).
  • outboundAttachements Map of outbound message attachments.


    Field Summary
    protected  MuleMessage message
               
     
    Constructor Summary
    MessageContext(MuleMessage message)
               
     
    Method Summary
     int getCorrelationGroupSize()
               
     String getCorrelationId()
               
     int getCorrelationSequence()
               
     DataType<?> getDataType()
               
     String getId()
               
     Map<String,DataHandler> getInboundAttachments()
               
     Map<String,Object> getInboundProperties()
               
     Map<String,DataHandler> getOutboundAttachments()
               
     Map<String,Object> getOutboundProperties()
               
     Object getPayload()
               
     Object getReplyTo()
               
     String getRootId()
               
    <T> T
    payloadAs(Class<T> type)
               
     Object payloadAs(DataType<?> dt)
               
     void setPayload(Object payload)
               
     void setReplyTo(String replyTo)
               
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Detail

    message

    protected MuleMessage message
    Constructor Detail

    MessageContext

    public MessageContext(MuleMessage message)
    Method Detail

    getId

    public String getId()

    getRootId

    public String getRootId()

    getCorrelationId

    public String getCorrelationId()

    getCorrelationSequence

    public int getCorrelationSequence()

    getCorrelationGroupSize

    public int getCorrelationGroupSize()

    getReplyTo

    public Object getReplyTo()

    setReplyTo

    public void setReplyTo(String replyTo)

    getDataType

    public DataType<?> getDataType()

    getPayload

    public Object getPayload()

    payloadAs

    public <T> T payloadAs(Class<T> type)
                throws TransformerException
    Throws:
    TransformerException

    payloadAs

    public Object payloadAs(DataType<?> dt)
                     throws TransformerException
    Throws:
    TransformerException

    setPayload

    public void setPayload(Object payload)

    getInboundProperties

    public Map<String,Object> getInboundProperties()

    getOutboundProperties

    public Map<String,Object> getOutboundProperties()

    getInboundAttachments

    public Map<String,DataHandler> getInboundAttachments()

    getOutboundAttachments

    public Map<String,DataHandler> getOutboundAttachments()


    Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.