|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.EventObject
org.mule.impl.MuleEvent
MuleEvent
represents any data event occuring in the Mule environment. All data
sent or received within the mule environment will be passed between components as an UMOEvent.
Field Summary | |
protected java.util.Iterator |
interceptorIterator
|
Fields inherited from class java.util.EventObject |
source |
Fields inherited from interface org.mule.umo.UMOEvent |
TIMEOUT_DO_NOT_WAIT, TIMEOUT_WAIT_FOREVER |
Constructor Summary | |
MuleEvent(UMOMessage message,
UMOEndpoint endpoint,
UMOComponent component,
UMOEvent previousEvent)
|
|
MuleEvent(UMOMessage message,
UMOEndpoint endpoint,
UMOSession session,
boolean synchronous)
|
|
MuleEvent(UMOMessage message,
UMOEndpoint endpoint,
UMOSession session,
boolean synchronous,
ResponseOutputStream outputStream)
Contructor. |
|
MuleEvent(UMOMessage message,
UMOEndpoint endpoint,
UMOSession session,
java.lang.String eventId,
boolean synchronous)
Contructor. |
|
MuleEvent(UMOMessage message,
UMOEvent rewriteEvent)
A helper constructor used to rewrite an event payload |
Method Summary | |
boolean |
equals(java.lang.Object o)
|
protected java.lang.String |
generateEventId()
|
boolean |
getBooleanProperty(java.lang.String name,
boolean defaultValue)
Gets a Boolean property associated with the current event. |
UMOComponent |
getComponent()
Gets the recipient component of this event |
double |
getDoubleProperty(java.lang.String name,
double defaultValue)
Gets a Double property associated with the current event. |
UMOEndpoint |
getEndpoint()
Gets the endpoint associated with this event |
java.lang.String |
getId()
Every event in the system is assigned a universally unique id (UUID). |
int |
getIntProperty(java.lang.String name,
int defaultValue)
Gets an Integer property associated with the current event. |
long |
getLongProperty(java.lang.String name,
long defaultValue)
Gets a Long property associated with the current event. |
UMOMessage |
getMessage()
Returns the message payload for this event |
byte[] |
getMessageAsBytes()
Reterns the conents of the message as a byte array. |
java.lang.String |
getMessageAsString()
Returns the message contents as a string |
java.io.OutputStream |
getOutputStream()
An outputstream the can optionally be used write response data to an incoming message. |
java.util.Map |
getProperties()
Returns a map of properties associated with the event |
java.lang.Object |
getProperty(java.lang.String name)
Gets a property associated with the current event. |
java.lang.Object |
getProperty(java.lang.String name,
java.lang.Object defaultValue)
Gets a property associated with the current event. |
UMOSession |
getSession()
Retrieves the component session for the current event |
int |
getTimeout()
The number of milliseconds to wait for a return event when running synchronously. |
java.lang.Object |
getTransformedMessage()
Returns the message transformed into it's recognised or expected format. |
byte[] |
getTransformedMessageAsBytes()
Returns the message transformed into it's recognised or expected format and then into an array of bytes. |
java.lang.String |
getTransformedMessageAsString()
Returns the message transformed into it's recognised or expected format and then into a String. |
int |
hashCode()
|
boolean |
isStopFurtherProcessing()
Determines whether the default processing for this event will be executed |
boolean |
isSynchronous()
Determines whether the was sent synchrounously or not |
java.lang.Object |
removeProperty(java.lang.Object key)
Removes a property from the event |
void |
setBooleanProperty(java.lang.String name,
boolean value)
Sets a Boolean property associated with the current event. |
void |
setDoubleProperty(java.lang.String name,
double value)
Sets a Double property associated with the current event. |
void |
setIntProperty(java.lang.String name,
int value)
Sets an Integer property associated with the current event. |
void |
setLongProperty(java.lang.String name,
long value)
Sets a Long property associated with the current event. |
void |
setProperty(java.lang.String name,
java.lang.Object value)
Sets a property associated with the current event. |
void |
setStopFurtherProcessing(boolean stopFurtherProcessing)
Setting this parameter will stop the Mule framework from processing this event in the standard way. |
void |
setSynchronous(boolean value)
Determines whether the was sent synchrounously or not |
void |
setTimeout(int timeout)
The number of milliseconds to wait for a return event when running synchronously. |
java.lang.String |
toString()
|
Methods inherited from class java.util.EventObject |
getSource |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected transient java.util.Iterator interceptorIterator
Constructor Detail |
public MuleEvent(UMOMessage message, UMOEndpoint endpoint, UMOComponent component, UMOEvent previousEvent)
public MuleEvent(UMOMessage message, UMOEndpoint endpoint, UMOSession session, boolean synchronous)
public MuleEvent(UMOMessage message, UMOEndpoint endpoint, UMOSession session, boolean synchronous, ResponseOutputStream outputStream)
message
- the event payloadendpoint
- the endpoint to associate with the eventsession
- the previous event if anyUMOMessageAdapter
public MuleEvent(UMOMessage message, UMOEndpoint endpoint, UMOSession session, java.lang.String eventId, boolean synchronous)
message
- the event payloadendpoint
- the endpoint to associate with the eventsession
- the previous event if anyUMOMessageAdapter
public MuleEvent(UMOMessage message, UMOEvent rewriteEvent)
message
- rewriteEvent
- Method Detail |
public UMOMessage getMessage()
UMOEvent
getMessage
in interface UMOEvent
public byte[] getMessageAsBytes() throws MuleException
UMOEvent
getMessageAsBytes
in interface UMOEvent
MuleException
public java.lang.Object getTransformedMessage() throws TransformerException
UMOEvent
getTransformedMessage
in interface UMOEvent
TransformerException
- if a failure occurs in the transformerUMOTransformer
public byte[] getTransformedMessageAsBytes() throws TransformerException
UMOEvent
getTransformedMessageAsBytes
in interface UMOEvent
TransformerException
- if a failure occurs in the transformerUMOTransformer
public java.lang.String getTransformedMessageAsString() throws TransformerException
getTransformedMessageAsString
in interface UMOEvent
TransformerException
- if a failure occurs in the transformerUMOTransformer
public java.lang.String getMessageAsString() throws MuleException
UMOEvent
getMessageAsString
in interface UMOEvent
MuleException
public java.lang.String getId()
UMOEvent
getId
in interface UMOEvent
public java.lang.Object getProperty(java.lang.String name)
UMOEvent
event.getMessage().getProperty(...)
getProperty
in interface UMOEvent
name
- the property name
public java.lang.Object getProperty(java.lang.String name, java.lang.Object defaultValue)
UMOEvent
event.getMessage().getProperty(..., ...)
getProperty
in interface UMOEvent
name
- the property namedefaultValue
- a default value if the property doesn't exist in the event
public void setProperty(java.lang.String name, java.lang.Object value)
UMOEvent
event.getMessage().setProperty(..., ...)
setProperty
in interface UMOEvent
name
- the property name or keyvalue
- the property valuepublic java.util.Map getProperties()
UMOEvent
getProperties
in interface UMOEvent
public UMOEndpoint getEndpoint()
UMOEvent
getEndpoint
in interface UMOEvent
public java.lang.String toString()
protected java.lang.String generateEventId()
public UMOSession getSession()
UMOEvent
getSession
in interface UMOEvent
public UMOComponent getComponent()
getComponent
in interface UMOEvent
public boolean isStopFurtherProcessing()
isStopFurtherProcessing
in interface UMOEvent
UMOManager
,
UMOEventContext
,
Callable
public void setStopFurtherProcessing(boolean stopFurtherProcessing)
setStopFurtherProcessing
in interface UMOEvent
stopFurtherProcessing
- The stopFurtherProcessing to set.public boolean equals(java.lang.Object o)
public int hashCode()
public boolean isSynchronous()
UMOEvent
isSynchronous
in interface UMOEvent
public void setSynchronous(boolean value)
UMOEvent
setSynchronous
in interface UMOEvent
value
- true if the event is synchronouspublic int getTimeout()
UMOEvent
getTimeout
in interface UMOEvent
public void setTimeout(int timeout)
UMOEvent
setTimeout
in interface UMOEvent
timeout
- the event timeout in millisecondspublic int getIntProperty(java.lang.String name, int defaultValue)
UMOEvent
event.getMessage().getIntProperty(..., ...)
getIntProperty
in interface UMOEvent
name
- the property namedefaultValue
- a default value if the property doesn't exist in the event
public long getLongProperty(java.lang.String name, long defaultValue)
UMOEvent
event.getMessage().getLongProperty(..., ...)
getLongProperty
in interface UMOEvent
name
- the property namedefaultValue
- a default value if the property doesn't exist in the event
public double getDoubleProperty(java.lang.String name, double defaultValue)
UMOEvent
event.getMessage().getDoubleProperty(..., ...)
getDoubleProperty
in interface UMOEvent
name
- the property namedefaultValue
- a default value if the property doesn't exist in the event
public boolean getBooleanProperty(java.lang.String name, boolean defaultValue)
UMOEvent
event.getMessage().getbooleanProperty(..., ...)
getBooleanProperty
in interface UMOEvent
name
- the property namedefaultValue
- a default value if the property doesn't exist in the event
public void setBooleanProperty(java.lang.String name, boolean value)
UMOEvent
event.getMessage().setBooleanProperty(..., ...)
setBooleanProperty
in interface UMOEvent
name
- the property name or keyvalue
- the property valuepublic void setIntProperty(java.lang.String name, int value)
UMOEvent
event.getMessage().setIntProperty(..., ...)
setIntProperty
in interface UMOEvent
name
- the property name or keyvalue
- the property valuepublic void setLongProperty(java.lang.String name, long value)
UMOEvent
event.getMessage().setLongProperty(..., ...)
setLongProperty
in interface UMOEvent
name
- the property name or keyvalue
- the property valuepublic void setDoubleProperty(java.lang.String name, double value)
UMOEvent
event.getMessage().setDoubleProperty(..., ...)
setDoubleProperty
in interface UMOEvent
name
- the property name or keyvalue
- the property valuepublic java.io.OutputStream getOutputStream()
getOutputStream
in interface UMOEvent
public java.lang.Object removeProperty(java.lang.Object key)
removeProperty
in interface UMOEvent
key
- the property key to remove
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |