|
||||||||||
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
public class 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 | |
---|---|
void |
assertAccess(boolean write)
This method may be called before data in the object are accessed. |
boolean |
equals(Object o)
|
protected void |
fillProperties(UMOEvent previousEvent)
|
protected String |
generateEventId()
|
UMOComponent |
getComponent()
Gets the recipient component of this event |
UMOCredentials |
getCredentials()
|
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). |
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 can optionally be used to write response data to an incoming message. |
Object |
getProperty(String name,
boolean exhaustiveSearch)
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 |
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 |
ThreadSafeAccess |
newThreadCopy()
|
void |
resetAccessControl()
This method should ONLY be used in the construction of composite ThreadSafeAccess instances. |
protected void |
setCredentials()
|
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. |
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 UMOEvent
public UMOMessage getMessage()
UMOEvent
getMessage
in interface UMOEvent
public byte[] getMessageAsBytes() throws MuleException
UMOEvent
getMessageAsBytes
in interface UMOEvent
MuleException
public Object getTransformedMessage() throws TransformerException
UMOEvent
getTransformedMessage
in interface UMOEvent
TransformerException
- if a failure occurs in the transformerUMOTransformer
public byte[] getTransformedMessageAsBytes() throws TransformerException
getTransformedMessageAsBytes
in interface UMOEvent
TransformerException
- 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 UMOEvent
TransformerException
- if a failure occurs in
the transformerUMOTransformer
public String getMessageAsString() throws UMOException
UMOEvent
getMessageAsString
in interface UMOEvent
UMOException
- if the message cannot be converted into a stringpublic String getTransformedMessageAsString(String encoding) throws TransformerException
getTransformedMessageAsString
in interface UMOEvent
encoding
- 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 UMOEvent
encoding
- 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 UMOEvent
public Object getProperty(String name, boolean exhaustiveSearch)
UMOEvent
exhaustiveSearch
is true, the endpoint and connector associated
with the event will also be searched for the property.
getProperty
in interface UMOEvent
name
- 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, boolean exhaustiveSearch)
UMOEvent
exhaustiveSearch
is true, the endpoint and connector associated
with the event will also be searched for the property.
getProperty
in interface UMOEvent
name
- 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 UMOImmutableEndpoint getEndpoint()
UMOEvent
getEndpoint
in interface UMOEvent
public String toString()
toString
in class EventObject
protected 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(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
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 OutputStream getOutputStream()
getOutputStream
in interface UMOEvent
public boolean isStreaming()
isStreaming
in interface UMOEvent
public String getEncoding()
getEncoding
in interface UMOEvent
public ThreadSafeAccess newThreadCopy()
newThreadCopy
in interface ThreadSafeAccess
public void resetAccessControl()
ThreadSafeAccess
resetAccessControl
in interface ThreadSafeAccess
public void assertAccess(boolean write)
ThreadSafeAccess
assertAccess
in interface ThreadSafeAccess
write
- True if the access will mutate values.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |