|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mule.DefaultMuleEvent
public class DefaultMuleEvent
DefaultMuleEvent represents any data event occurring in the Mule environment. All data sent or
received within the Mule environment will be passed between components as an MuleEvent.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.mule.api.ThreadSafeAccess |
|---|
ThreadSafeAccess.AccessControl |
| Nested classes/interfaces inherited from interface org.mule.util.store.DeserializationPostInitialisable |
|---|
DeserializationPostInitialisable.Implementation |
| Field Summary | |
|---|---|
protected String[] |
ignoredPropertyOverrides
|
| Fields inherited from interface org.mule.api.MuleEvent |
|---|
TIMEOUT_DO_NOT_WAIT, TIMEOUT_NOT_SET_VALUE, TIMEOUT_WAIT_FOREVER |
| Fields inherited from interface org.mule.api.ThreadSafeAccess |
|---|
READ, WRITE |
| Constructor Summary | |
|---|---|
|
DefaultMuleEvent(MuleEvent rewriteEvent,
FlowConstruct flowConstruct)
|
|
DefaultMuleEvent(MuleMessage message,
InboundEndpoint endpoint,
FlowConstruct flowConstruct)
|
|
DefaultMuleEvent(MuleMessage message,
InboundEndpoint endpoint,
FlowConstruct flowConstruct,
MuleSession session)
|
|
DefaultMuleEvent(MuleMessage message,
InboundEndpoint endpoint,
FlowConstruct flowConstruct,
MuleSession session,
ReplyToHandler replyToHandler,
ResponseOutputStream outputStream)
|
|
DefaultMuleEvent(MuleMessage message,
InboundEndpoint endpoint,
MuleSession session)
Deprecated. |
|
DefaultMuleEvent(MuleMessage message,
InboundEndpoint endpoint,
MuleSession session,
ReplyToHandler replyToHandler,
ResponseOutputStream outputStream)
Deprecated. |
|
DefaultMuleEvent(MuleMessage message,
MessageExchangePattern exchangePattern,
FlowConstruct flowConstruct)
|
|
DefaultMuleEvent(MuleMessage message,
MessageExchangePattern exchangePattern,
FlowConstruct flowConstruct,
MuleSession session)
Constructor used to create a message with no message source with minimal arguments |
|
DefaultMuleEvent(MuleMessage message,
MessageExchangePattern exchangePattern,
FlowConstruct flowConstruct,
MuleSession session,
int timeout,
Credentials credentials,
ResponseOutputStream outputStream)
Constructor used to create a message with no message source with all additional arguments |
|
DefaultMuleEvent(MuleMessage message,
MessageExchangePattern exchangePattern,
FlowConstruct flowConstruct,
MuleSession session,
ResponseOutputStream outputStream)
Constructor used to create a message with no message source with minimal arguments and ResponseOutputStream |
|
DefaultMuleEvent(MuleMessage message,
MessageExchangePattern exchangePattern,
MuleSession session)
Deprecated. |
|
DefaultMuleEvent(MuleMessage message,
MessageExchangePattern exchangePattern,
MuleSession session,
int timeout,
Credentials credentials,
ResponseOutputStream outputStream)
Deprecated. |
|
DefaultMuleEvent(MuleMessage message,
MessageExchangePattern exchangePattern,
MuleSession session,
ResponseOutputStream outputStream)
Deprecated. |
|
DefaultMuleEvent(MuleMessage message,
MuleEvent rewriteEvent)
A helper constructor used to rewrite an event payload |
|
DefaultMuleEvent(MuleMessage message,
MuleEvent rewriteEvent,
boolean synchronus)
|
protected |
DefaultMuleEvent(MuleMessage message,
MuleEvent rewriteEvent,
FlowConstruct flowConstruct,
MuleSession session,
boolean synchronous)
|
|
DefaultMuleEvent(MuleMessage message,
MuleEvent rewriteEvent,
MuleSession session)
A helper constructor used to rewrite an event payload |
|
DefaultMuleEvent(MuleMessage message,
URI messageSourceURI,
MessageExchangePattern exchangePattern,
FlowConstruct flowConstruct,
MuleSession session)
Constructor used to create a message with a uri that idendifies the message source with minimal arguments |
|
DefaultMuleEvent(MuleMessage message,
URI messageSourceURI,
MessageExchangePattern exchangePattern,
FlowConstruct flowConstruct,
MuleSession session,
int timeout,
Credentials credentials,
ResponseOutputStream outputStream)
Constructor used to create a message with a identifiable message source with all additional arguments |
|
DefaultMuleEvent(MuleMessage message,
URI messageSourceURI,
MessageExchangePattern exchangePattern,
FlowConstruct flowConstruct,
MuleSession session,
ResponseOutputStream outputStream)
Constructor used to create a message with a uri that idendifies the message source with minimal arguments and ResponseOutputStream |
|
DefaultMuleEvent(MuleMessage message,
URI messageSourceURI,
MessageExchangePattern exchangePattern,
MuleSession session)
Deprecated. |
|
DefaultMuleEvent(MuleMessage message,
URI messageSourceURI,
MessageExchangePattern exchangePattern,
MuleSession session,
int timeout,
Credentials credentials,
ResponseOutputStream outputStream)
Deprecated. |
|
DefaultMuleEvent(MuleMessage message,
URI messageSourceURI,
MessageExchangePattern exchangePattern,
MuleSession session,
ResponseOutputStream outputStream)
Deprecated. |
|
DefaultMuleEvent(MuleMessage message,
URI messageSourceURI,
String messageSourceName,
MessageExchangePattern exchangePattern,
FlowConstruct flowConstruct,
MuleSession session,
int timeout,
Credentials credentials,
ResponseOutputStream outputStream,
String encoding,
boolean transacted,
boolean synchronous,
Object replyToDestination,
ReplyToHandler replyToHandler)
|
|
DefaultMuleEvent(MuleMessage message,
URI messageSourceURI,
String messageSourceName,
MessageExchangePattern exchangePattern,
MuleSession session,
int timeout,
Credentials credentials,
ResponseOutputStream outputStream,
String encoding,
boolean transacted,
boolean synchronous,
Object replyToDestination,
ReplyToHandler replyToHandler)
Deprecated. |
| Method Summary | ||
|---|---|---|
void |
assertAccess(boolean write)
This method may be called before data in the object are accessed. |
|
void |
captureReplyToDestination()
Set the reply-to destination from the current message, and remove it from the message, to prevent any further propagation. |
|
void |
clearFlowVariables()
|
|
void |
clearSessionVariables()
|
|
static MuleEvent |
copy(MuleEvent event)
|
|
boolean |
equals(Object o)
|
|
protected Credentials |
extractCredentials(InboundEndpoint endpoint)
|
|
protected void |
fillProperties(InboundEndpoint endpoint)
|
|
protected String |
generateEventId(MuleContext context)
|
|
Credentials |
getCredentials()
|
|
String |
getEncoding()
Gets the encoding for this message. |
|
MessageExchangePattern |
getExchangePattern()
Returns the message exchange pattern for this event |
|
FlowConstruct |
getFlowConstruct()
Gets the recipient service of this event |
|
|
getFlowVariable(String key)
|
|
Set<String> |
getFlowVariableNames()
|
|
String |
getId()
Every event in the system is assigned a universally unique id (UUID). |
|
MuleMessage |
getMessage()
Returns the message payload for this event |
|
byte[] |
getMessageAsBytes()
Returns the contents of the message as a byte array. |
|
String |
getMessageAsString()
Returns the message contents as a string If necessary this will use the encoding set on the event |
|
String |
getMessageAsString(String encoding)
Returns the message contents for logging |
|
String |
getMessageSourceName()
Returns the message source name if it has one, otherwise returns toString() of the URI returned be getMessageSourceURI() |
|
URI |
getMessageSourceURI()
Returns the URI of the MessageSource that recieved or generated the message being processed. |
|
MuleContext |
getMuleContext()
Returns the muleContext for the Mule node that this event was received in |
|
OutputStream |
getOutputStream()
An output stream can optionally be used to write response data to an incoming message. |
|
ProcessingTime |
getProcessingTime()
Returns the times spent processing this event (so far) |
|
Object |
getProperty(String name)
Deprecated. use appropriate scope-aware calls on the MuleMessage (via event.getMessage()) |
|
Object |
getProperty(String name,
Object defaultValue)
Deprecated. use appropriate scope-aware calls on the MuleMessage (via event.getMessage()) |
|
Object |
getReplyToDestination()
Return the destination (if any) that will be passed to the reply-to handler. |
|
ReplyToHandler |
getReplyToHandler()
Return the replyToHandler (if any) that will be used to perform async reply |
|
MuleSession |
getSession()
Retrieves the service session for the current event |
|
|
getSessionVariable(String key)
|
|
Set<String> |
getSessionVariableNames()
|
|
int |
getTimeout()
The number of milliseconds to wait for a return event when running synchronously. |
|
int |
hashCode()
|
|
protected boolean |
ignoreProperty(String key)
This method is used to determine if a property on the previous event should be ignored for the next event. |
|
boolean |
isNotificationsEnabled()
Indicates if notifications should be fired when processing this message. |
|
boolean |
isStopFurtherProcessing()
Determines whether the default processing for this event will be executed |
|
boolean |
isSynchronous()
|
|
boolean |
isTransacted()
Returns true is this event is being processed in a transaction |
|
ThreadSafeAccess |
newThreadCopy()
|
|
void |
removeFlowVariable(String key)
|
|
void |
removeSessionVariable(String key)
|
|
void |
resetAccessControl()
This method should ONLY be used in the construction of composite ThreadSafeAccess instances. |
|
protected boolean |
resolveEventSynchronicity()
|
|
void |
setEnableNotifications(boolean enabled)
Enables the firing of notifications when processing the message. |
|
void |
setFlowVariable(String key,
Object value)
|
|
void |
setMessage(MuleMessage message)
|
|
void |
setSessionVariable(String key,
Object value)
|
|
void |
setStopFurtherProcessing(boolean stopFurtherProcessing)
Setting this parameter will stop the Mule framework from processing this event in the standard way. |
|
void |
setTimeout(int timeout)
The number of milliseconds to wait for a return event when running synchronously. |
|
String |
toString()
|
|
Object |
transformMessage()
Deprecated. |
|
|
transformMessage(Class<T> outputType)
Transforms the message into the requested format. |
|
|
transformMessage(DataType<T> outputType)
Transforms the message into the requested format. |
|
byte[] |
transformMessageToBytes()
Deprecated. use transformMessage(org.mule.api.transformer.DataType) instead |
|
String |
transformMessageToString()
Returns the message transformed into it's recognised or expected format and then into a String. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected String[] ignoredPropertyOverrides
| Constructor Detail |
|---|
public DefaultMuleEvent(MuleMessage message,
MessageExchangePattern exchangePattern,
FlowConstruct flowConstruct,
MuleSession session)
public DefaultMuleEvent(MuleMessage message,
MessageExchangePattern exchangePattern,
FlowConstruct flowConstruct)
public DefaultMuleEvent(MuleMessage message,
MessageExchangePattern exchangePattern,
FlowConstruct flowConstruct,
MuleSession session,
ResponseOutputStream outputStream)
public DefaultMuleEvent(MuleMessage message,
MessageExchangePattern exchangePattern,
FlowConstruct flowConstruct,
MuleSession session,
int timeout,
Credentials credentials,
ResponseOutputStream outputStream)
public DefaultMuleEvent(MuleMessage message,
URI messageSourceURI,
MessageExchangePattern exchangePattern,
FlowConstruct flowConstruct,
MuleSession session)
public DefaultMuleEvent(MuleMessage message,
URI messageSourceURI,
MessageExchangePattern exchangePattern,
FlowConstruct flowConstruct,
MuleSession session,
ResponseOutputStream outputStream)
public DefaultMuleEvent(MuleMessage message,
URI messageSourceURI,
MessageExchangePattern exchangePattern,
FlowConstruct flowConstruct,
MuleSession session,
int timeout,
Credentials credentials,
ResponseOutputStream outputStream)
public DefaultMuleEvent(MuleMessage message,
InboundEndpoint endpoint,
FlowConstruct flowConstruct,
MuleSession session)
public DefaultMuleEvent(MuleMessage message,
InboundEndpoint endpoint,
FlowConstruct flowConstruct)
public DefaultMuleEvent(MuleMessage message,
InboundEndpoint endpoint,
FlowConstruct flowConstruct,
MuleSession session,
ReplyToHandler replyToHandler,
ResponseOutputStream outputStream)
public DefaultMuleEvent(MuleMessage message,
MuleEvent rewriteEvent)
message - The message to use as the current payload of the eventrewriteEvent - the previous event that will be used as a template for this event
public DefaultMuleEvent(MuleEvent rewriteEvent,
FlowConstruct flowConstruct)
public DefaultMuleEvent(MuleMessage message,
MuleEvent rewriteEvent,
boolean synchronus)
public DefaultMuleEvent(MuleMessage message,
MuleEvent rewriteEvent,
MuleSession session)
message - The message to use as the current payload of the eventrewriteEvent - the previous event that will be used as a template for this event
protected DefaultMuleEvent(MuleMessage message,
MuleEvent rewriteEvent,
FlowConstruct flowConstruct,
MuleSession session,
boolean synchronous)
public DefaultMuleEvent(MuleMessage message,
URI messageSourceURI,
String messageSourceName,
MessageExchangePattern exchangePattern,
FlowConstruct flowConstruct,
MuleSession session,
int timeout,
Credentials credentials,
ResponseOutputStream outputStream,
String encoding,
boolean transacted,
boolean synchronous,
Object replyToDestination,
ReplyToHandler replyToHandler)
@Deprecated
public DefaultMuleEvent(MuleMessage message,
MessageExchangePattern exchangePattern,
MuleSession session)
@Deprecated
public DefaultMuleEvent(MuleMessage message,
MessageExchangePattern exchangePattern,
MuleSession session,
ResponseOutputStream outputStream)
@Deprecated
public DefaultMuleEvent(MuleMessage message,
MessageExchangePattern exchangePattern,
MuleSession session,
int timeout,
Credentials credentials,
ResponseOutputStream outputStream)
@Deprecated
public DefaultMuleEvent(MuleMessage message,
URI messageSourceURI,
MessageExchangePattern exchangePattern,
MuleSession session)
@Deprecated
public DefaultMuleEvent(MuleMessage message,
URI messageSourceURI,
MessageExchangePattern exchangePattern,
MuleSession session,
ResponseOutputStream outputStream)
@Deprecated
public DefaultMuleEvent(MuleMessage message,
URI messageSourceURI,
MessageExchangePattern exchangePattern,
MuleSession session,
int timeout,
Credentials credentials,
ResponseOutputStream outputStream)
@Deprecated
public DefaultMuleEvent(MuleMessage message,
InboundEndpoint endpoint,
MuleSession session)
@Deprecated
public DefaultMuleEvent(MuleMessage message,
InboundEndpoint endpoint,
MuleSession session,
ReplyToHandler replyToHandler,
ResponseOutputStream outputStream)
@Deprecated
public DefaultMuleEvent(MuleMessage message,
URI messageSourceURI,
String messageSourceName,
MessageExchangePattern exchangePattern,
MuleSession session,
int timeout,
Credentials credentials,
ResponseOutputStream outputStream,
String encoding,
boolean transacted,
boolean synchronous,
Object replyToDestination,
ReplyToHandler replyToHandler)
| Method Detail |
|---|
protected boolean resolveEventSynchronicity()
protected void fillProperties(InboundEndpoint endpoint)
protected boolean ignoreProperty(String key)
key - The name of the property to ignore
protected Credentials extractCredentials(InboundEndpoint endpoint)
public Credentials getCredentials()
getCredentials in interface MuleEventpublic MuleMessage getMessage()
MuleEvent
getMessage in interface MuleEvent
public byte[] getMessageAsBytes()
throws DefaultMuleException
MuleEvent
getMessageAsBytes in interface MuleEventDefaultMuleException
public <T> T transformMessage(Class<T> outputType)
throws TransformerException
MuleEvent
transformMessage in interface MuleEventoutputType - The requested output type.
TransformerException - if a failure occurs in the transformerif the transform fails or the outputtype is null
public <T> T transformMessage(DataType<T> outputType)
throws TransformerException
MuleEvent
transformMessage in interface MuleEventoutputType - The requested output type.
TransformerException - if a failure occurs in the transformerif the transform fails or the outputtype is null
@Deprecated
public byte[] transformMessageToBytes()
throws TransformerException
transformMessage(org.mule.api.transformer.DataType) instead
transformMessageToBytes in interface MuleEventTransformerException - if an unsupported encoding is being used or if the result message is not a
String byte[] or Seializable objectTransformer
public String transformMessageToString()
throws TransformerException
transformMessageToString in interface MuleEventTransformerException - if a failure occurs in the transformerTransformer
public String getMessageAsString()
throws MuleException
MuleEvent
getMessageAsString in interface MuleEventMuleException - if the message cannot be converted into a string
public String getMessageAsString(String encoding)
throws MuleException
getMessageAsString in interface MuleEventencoding - the encoding to use when converting bytes to a string, if necessary
MuleException - if the message cannot be converted into a stringpublic String getId()
MuleEvent
getId in interface MuleEvent@Deprecated public Object getProperty(String name)
MuleEvent
getProperty in interface MuleEventname - the property name
getMessage()
@Deprecated
public Object getProperty(String name,
Object defaultValue)
MuleEvent
getProperty in interface MuleEventname - the property namedefaultValue - a default value if the property doesn't exist in the event
getMessage()public String toString()
toString in class Objectprotected String generateEventId(MuleContext context)
public MuleSession getSession()
MuleEvent
getSession in interface MuleEventpublic FlowConstruct getFlowConstruct()
getFlowConstruct in interface MuleEventpublic boolean isStopFurtherProcessing()
isStopFurtherProcessing in interface MuleEventMuleContext,
MuleEventContext,
Callablepublic void setStopFurtherProcessing(boolean stopFurtherProcessing)
setStopFurtherProcessing in interface MuleEventstopFurtherProcessing - The stopFurtherProcessing to set.public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic int getTimeout()
MuleEvent
getTimeout in interface MuleEventpublic void setTimeout(int timeout)
MuleEvent
setTimeout in interface MuleEventtimeout - the event timeout in millisecondspublic OutputStream getOutputStream()
getOutputStream in interface MuleEventpublic String getEncoding()
getEncoding in interface MuleEventpublic MuleContext getMuleContext()
MuleEvent
getMuleContext in interface MuleEventpublic ThreadSafeAccess newThreadCopy()
newThreadCopy in interface ThreadSafeAccesspublic void resetAccessControl()
ThreadSafeAccess
resetAccessControl in interface ThreadSafeAccesspublic void assertAccess(boolean write)
ThreadSafeAccess
assertAccess in interface ThreadSafeAccesswrite - True if the access will mutate values.
@Deprecated
public Object transformMessage()
throws TransformerException
MuleEvent
transformMessage in interface MuleEventTransformerException - if a failure occurs in the transformerTransformerpublic ProcessingTime getProcessingTime()
MuleEvent
getProcessingTime in interface MuleEventpublic MessageExchangePattern getExchangePattern()
MuleEvent
getExchangePattern in interface MuleEventpublic boolean isTransacted()
MuleEvent
isTransacted in interface MuleEventpublic URI getMessageSourceURI()
MuleEventURI of the MessageSource that recieved or generated the message being processed.
getMessageSourceURI in interface MuleEventpublic String getMessageSourceName()
MuleEvent
getMessageSourceName in interface MuleEventpublic ReplyToHandler getReplyToHandler()
MuleEvent
getReplyToHandler in interface MuleEventpublic Object getReplyToDestination()
MuleEvent
getReplyToDestination in interface MuleEventpublic void captureReplyToDestination()
MuleEvent
captureReplyToDestination in interface MuleEventpublic boolean isSynchronous()
isSynchronous in interface MuleEventpublic void setMessage(MuleMessage message)
setMessage in interface MuleEventpublic static MuleEvent copy(MuleEvent event)
public Set<String> getFlowVariableNames()
getFlowVariableNames in interface MuleEventpublic void clearFlowVariables()
clearFlowVariables in interface MuleEventpublic <T> T getFlowVariable(String key)
getFlowVariable in interface MuleEvent
public void setFlowVariable(String key,
Object value)
setFlowVariable in interface MuleEventpublic void removeFlowVariable(String key)
removeFlowVariable in interface MuleEventpublic <T> T getSessionVariable(String key)
getSessionVariable in interface MuleEvent
public void setSessionVariable(String key,
Object value)
setSessionVariable in interface MuleEventpublic void removeSessionVariable(String key)
removeSessionVariable in interface MuleEventpublic Set<String> getSessionVariableNames()
getSessionVariableNames in interface MuleEventpublic void clearSessionVariables()
clearSessionVariables in interface MuleEventpublic boolean isNotificationsEnabled()
MuleEvent
isNotificationsEnabled in interface MuleEventpublic void setEnableNotifications(boolean enabled)
MuleEvent
setEnableNotifications in interface MuleEvent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||