|
|||||||||||
| 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 String[] |
ignoredPropertyOverrides
|
protected Log |
logger
logger used by this class |
| Fields inherited from class java.util.EventObject |
source |
| Fields inherited from interface org.mule.umo.UMOEvent |
TIMEOUT_DO_NOT_WAIT, TIMEOUT_NOT_SET_VALUE, TIMEOUT_WAIT_FOREVER |
| Constructor Summary | |
MuleEvent(UMOMessage message,
UMOEvent rewriteEvent)
A helper constructor used to rewrite an event payload |
|
MuleEvent(UMOMessage message,
UMOImmutableEndpoint endpoint,
UMOComponent component,
UMOEvent previousEvent)
Properties cache that only reads properties once from the inbound message and merges them with any properties on the endpoint. |
|
MuleEvent(UMOMessage message,
UMOImmutableEndpoint endpoint,
UMOSession session,
boolean synchronous)
|
|
MuleEvent(UMOMessage message,
UMOImmutableEndpoint endpoint,
UMOSession session,
boolean synchronous,
ResponseOutputStream outputStream)
Contructor. |
|
MuleEvent(UMOMessage message,
UMOImmutableEndpoint endpoint,
UMOSession session,
String eventId,
boolean synchronous)
Contructor. |
|
| Method Summary | |
boolean |
equals(Object o)
|
protected void |
fillProperties(UMOEvent previousEvent)
|
protected String |
generateEventId()
|
boolean |
getBooleanProperty(String name,
boolean defaultValue)
Gets a boolean property on the nessage |
UMOComponent |
getComponent()
Gets the recipient component of this event |
UMOCredentials |
getCredentials()
|
double |
getDoubleProperty(String name,
double defaultValue)
Gets a double property on the nessage |
String |
getEncoding()
Gets the encoding for this message. |
UMOImmutableEndpoint |
getEndpoint()
Gets the endpoint associated with this event |
String |
getId()
Every event in the system is assigned a universally unique id (UUID). |
int |
getIntProperty(String name,
int defaultValue)
Gets an int property on the nessage |
long |
getLongProperty(String name,
long defaultValue)
Gets a long property on the nessage |
UMOMessage |
getMessage()
Returns the message payload for this event |
byte[] |
getMessageAsBytes()
Reterns the conents 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 as a string |
OutputStream |
getOutputStream()
An outputstream the can optionally be used write response data to an incoming message. |
Object |
getProperty(String name)
Gets a property associated with the current event. |
Object |
getProperty(String name,
boolean exhaustiveSearch)
Gets a property associated with the current event. |
Object |
getProperty(String name,
Object defaultValue)
Gets a property associated with the current event. |
Object |
getProperty(String name,
Object defaultValue,
boolean exhaustiveSearch)
Gets a property associated with the current event. |
UMOSession |
getSession()
Retrieves the component session for the current event |
String |
getStringProperty(String name,
String defaultValue)
Will retrieve a string proerty form the event. |
int |
getTimeout()
The number of milliseconds to wait for a return event when running synchronously. |
Object |
getTransformedMessage()
Returns the message transformed into it's recognised or expected format. |
byte[] |
getTransformedMessageAsBytes()
This method will attempt to convert the transformed message into an array of bytes It will first check if the result of the transformation is a byte array and return that. |
String |
getTransformedMessageAsString()
Returns the message transformed into it's recognised or expected format and then into a String. |
String |
getTransformedMessageAsString(String encoding)
Returns the message transformed into it's recognised or expected format and then into a String. |
int |
hashCode()
|
protected boolean |
ignoreProperty(String key)
This method is used to determine if a property on the previous event should be ignorred for the next event. |
boolean |
isStopFurtherProcessing()
Determines whether the default processing for this event will be executed |
boolean |
isStreaming()
Determines whether the event flow is being streamed |
boolean |
isSynchronous()
Determines whether the was sent synchrounously or not |
Object |
removeProperty(String key)
Removes a property from the event |
void |
setBooleanProperty(String name,
boolean value)
Sets a boolean property on the nessage |
protected void |
setCredentials()
|
void |
setDoubleProperty(String name,
double value)
Sets a double property on the nessage |
void |
setIntProperty(String name,
int value)
Sets an int property on the nessage |
void |
setLongProperty(String name,
long value)
Sets a long property on the nessage |
void |
setProperty(String name,
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 |
setStringProperty(String name,
String value)
Sets a String property associated with the current event. |
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. |
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 Log logger
protected String[] ignoredPropertyOverrides
| Constructor Detail |
public MuleEvent(UMOMessage message,
UMOImmutableEndpoint endpoint,
UMOComponent component,
UMOEvent previousEvent)
public MuleEvent(UMOMessage message,
UMOImmutableEndpoint endpoint,
UMOSession session,
boolean synchronous)
public MuleEvent(UMOMessage message,
UMOImmutableEndpoint 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,
UMOImmutableEndpoint endpoint,
UMOSession session,
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 |
protected void fillProperties(UMOEvent previousEvent)
protected boolean ignoreProperty(String key)
key -
protected void setCredentials()
public UMOCredentials getCredentials()
getCredentials in interface UMOEventpublic UMOMessage getMessage()
UMOEvent
getMessage in interface UMOEvent
public byte[] getMessageAsBytes()
throws MuleException
UMOEvent
getMessageAsBytes in interface UMOEventMuleException
public Object getTransformedMessage()
throws TransformerException
UMOEvent
getTransformedMessage in interface UMOEventTransformerException - if a failure occurs in the transformerUMOTransformer
public byte[] getTransformedMessageAsBytes()
throws TransformerException
getTransformedMessageAsBytes in interface UMOEventTransformerException - if an unsupported encoding is being used or if
the result message is not a String byte[] or Seializable objectUMOTransformer
public String getTransformedMessageAsString()
throws TransformerException
getTransformedMessageAsString in interface UMOEventTransformerException - if a failure occurs in
the transformerUMOTransformer
public String getMessageAsString()
throws UMOException
UMOEvent
getMessageAsString in interface UMOEventUMOException - if the message cannot be converted into a string
public String getTransformedMessageAsString(String encoding)
throws TransformerException
getTransformedMessageAsString in interface UMOEventencoding - the encoding to use when converting the message to string
TransformerException - if a failure occurs in
the transformerUMOTransformer
public String getMessageAsString(String encoding)
throws UMOException
getMessageAsString in interface UMOEventencoding - the encoding to use when converting the message to string
UMOException - if the message cannot be converted into a
stringpublic String getId()
UMOEvent
getId in interface UMOEventpublic Object getProperty(String name)
UMOEventevent.getMessage().getProperty(...)
getProperty in interface UMOEventname -
public Object getProperty(String name,
boolean exhaustiveSearch)
UMOEventexhaustiveSearch is true, the endpoint and connector associated
with the event will also be searched for the property.
getProperty in interface UMOEventname - the property nameexhaustiveSearch - also search the endpoint and connector for the
property
UMOEvent.getProperty(java.lang.String, boolean)
public Object getProperty(String name,
Object defaultValue)
UMOEventevent.getMessage().getProperty(..., ...)
getProperty in interface UMOEventname - the property namedefaultValue - a default value if the property doesn't exist in the event
public Object getProperty(String name,
Object defaultValue,
boolean exhaustiveSearch)
UMOEventexhaustiveSearch is true, the endpoint and connector associated
with the event will also be searched for the property.
getProperty in interface UMOEventname - the property namedefaultValue - a default value if the property doesn't exist in the eventexhaustiveSearch - also search the endpoint and connector for the
property
public void setProperty(String name,
Object value)
UMOEventevent.getMessage().setProperty(..., ...)
setProperty in interface UMOEventname - the property name or keyvalue - the property valuepublic UMOImmutableEndpoint getEndpoint()
UMOEvent
getEndpoint in interface UMOEventpublic String toString()
protected String generateEventId()
public UMOSession getSession()
UMOEvent
getSession in interface UMOEventpublic UMOComponent getComponent()
getComponent in interface UMOEventpublic boolean isStopFurtherProcessing()
isStopFurtherProcessing in interface UMOEventUMOManager,
UMOEventContext,
Callablepublic void setStopFurtherProcessing(boolean stopFurtherProcessing)
setStopFurtherProcessing in interface UMOEventstopFurtherProcessing - The stopFurtherProcessing to set.public boolean equals(Object o)
public int hashCode()
public boolean isSynchronous()
UMOEvent
isSynchronous in interface UMOEventpublic void setSynchronous(boolean value)
UMOEvent
setSynchronous in interface UMOEventvalue - true if the event is synchronouspublic int getTimeout()
UMOEvent
getTimeout in interface UMOEventpublic void setTimeout(int timeout)
UMOEvent
setTimeout in interface UMOEventtimeout - the event timeout in milliseconds
public int getIntProperty(String name,
int defaultValue)
getIntProperty in interface UMOEventname - defaultValue - a default value if the property doesn't exist in the event
public long getLongProperty(String name,
long defaultValue)
getLongProperty in interface UMOEventname - defaultValue - a default value if the property doesn't exist in the event
public double getDoubleProperty(String name,
double defaultValue)
getDoubleProperty in interface UMOEventname - defaultValue - a default value if the property doesn't exist in the event
public boolean getBooleanProperty(String name,
boolean defaultValue)
getBooleanProperty in interface UMOEventname - defaultValue - a default value if the property doesn't exist in the event
public void setBooleanProperty(String name,
boolean value)
setBooleanProperty in interface UMOEventname - value -
public void setIntProperty(String name,
int value)
setIntProperty in interface UMOEventname - value -
public void setLongProperty(String name,
long value)
setLongProperty in interface UMOEventname - value -
public void setDoubleProperty(String name,
double value)
setDoubleProperty in interface UMOEventname - value - public OutputStream getOutputStream()
getOutputStream in interface UMOEventpublic Object removeProperty(String key)
removeProperty in interface UMOEventkey - the property key to remove
public String getStringProperty(String name,
String defaultValue)
getStringProperty in interface UMOEventname - the name of the proerty to getdefaultValue - the default value to return if the proerty is not set
public void setStringProperty(String name,
String value)
UMOEventevent.getMessage().setStringProperty(..., ...)
setStringProperty in interface UMOEventname - the property name or keyvalue - the property valuepublic boolean isStreaming()
isStreaming in interface UMOEventpublic String getEncoding()
getEncoding in interface UMOEvent
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||