| |
|
| org.mule.api.MuleEvent
All known Subclasses: org.mule.DefaultMuleEvent,
MuleEvent | public interface MuleEvent (Code) | | 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 MuleEvent. The MuleEvent holds a MuleMessage
payload and provides helper methods for obtaining the data in a format that the
receiving Mule UMO understands. The event can also maintain any number of
properties that can be set and retrieved by Mule UMO components.
See Also: MuleMessage |
TIMEOUT_DO_NOT_WAIT | int TIMEOUT_DO_NOT_WAIT(Code) | | |
TIMEOUT_NOT_SET_VALUE | int TIMEOUT_NOT_SET_VALUE(Code) | | |
TIMEOUT_WAIT_FOREVER | int TIMEOUT_WAIT_FOREVER(Code) | | |
getEncoding | String getEncoding()(Code) | | Gets the encoding for this message.
the encoding for the event. This must never return null. |
getEndpoint | ImmutableEndpoint getEndpoint()(Code) | | Gets the endpoint associated with this event
the endpoint associated with this event |
getId | String getId()(Code) | | Every event in the system is assigned a universally unique id (UUID).
the unique identifier for the event |
getMessage | MuleMessage getMessage()(Code) | | Returns the message payload for this event
the message payload for this event |
getMessageAsBytes | byte[] getMessageAsBytes() throws MuleException(Code) | | Reterns the conents of the message as a byte array.
the conents of the message as a byte array throws: MuleException - if the message cannot be converted into an array of bytes |
getMessageAsString | String getMessageAsString() throws MuleException(Code) | | Returns the message contents as a string If necessary this will use the
encoding set on the event
the message contents as a string throws: MuleException - if the message cannot be converted into a string |
getMessageAsString | String getMessageAsString(String encoding) throws MuleException(Code) | | Returns the message contents as a string
Parameters: encoding - the encoding to use when converting the message to string the message contents as a string throws: MuleException - if the message cannot be converted into a string |
getMuleContext | MuleContext getMuleContext()(Code) | | Returns the muleContext for the Mule node that this event was received in
the muleContext for the Mule node that this event was received in |
getOutputStream | OutputStream getOutputStream()(Code) | | An outputstream the can optionally be used write response data to an incoming
message.
an output strem if one has been made available by the message receiverthat received the message |
getProperty | Object getProperty(String name, boolean exhaustiveSearch)(Code) | | Gets a property associated with the current event. If
exhaustiveSearch is true, the endpoint and connector associated
with the event will also be searched for the property.
Parameters: name - the property name Parameters: exhaustiveSearch - also search the endpoint and connector for theproperty the property value or null if the property does not exist |
getProperty | Object getProperty(String name, Object defaultValue, boolean exhaustiveSearch)(Code) | | Gets a property associated with the current event. If
exhaustiveSearch is true, the endpoint and connector associated
with the event will also be searched for the property.
Parameters: name - the property name Parameters: defaultValue - a default value if the property doesn't exist in the event Parameters: exhaustiveSearch - also search the endpoint and connector for theproperty the property value or the defaultValue if the property does not exist |
getService | Service getService()(Code) | | Retrieves the service for the current event
the service for the event |
getSession | MuleSession getSession()(Code) | | Retrieves the service session for the current event
the service session for the event |
getTimeout | int getTimeout()(Code) | | The number of milliseconds to wait for a return event when running
synchronously. 0 wait forever -1 try and receive, but do not wait or a
positive millisecond value
the event timeout in milliseconds |
isStopFurtherProcessing | boolean isStopFurtherProcessing()(Code) | | Determines whether the default processing for this event will be executed. By
default, the Mule server will route events according to a components
configuration. The user can override this behaviour by obtaining a reference
to the MuleEvent context, either by implementing
org.mule.api.lifecycle.Callable or calling
UMOManager.getEventContext to obtain the MuleEventContext for
the current thread. The user can programmatically control how events are
dispached.
Returns true is the user has set stopFurtherProcessing. See Also: org.mule.api.context.UMOManager See Also: MuleEventContext See Also: org.mule.api.lifecycle.Callable |
isSynchronous | boolean isSynchronous()(Code) | | Determines whether the was sent synchrounously or not
true if the event is synchronous |
setStopFurtherProcessing | void setStopFurtherProcessing(boolean stopFurtherProcessing)(Code) | | Determines whether the default processing for this event will be executed. By
default, the Mule server will route events according to a components
configuration. The user can override this behaviour by obtaining a reference
to the MuleEvent context, either by implementing
org.mule.api.lifecycle.Callable or calling
UMOManager.getEventContext to obtain the MuleEventContext for
the current thread. The user can programmatically control how events are
dispached.
Parameters: stopFurtherProcessing - the value to set. |
setSynchronous | void setSynchronous(boolean value)(Code) | | Determines whether the was sent synchrounously or not
Parameters: value - true if the event is synchronous |
setTimeout | void setTimeout(int timeout)(Code) | | The number of milliseconds to wait for a return event when running
synchronously. 0 wait forever -1 try and receive, but do not wait or a
positive millisecod value
Parameters: timeout - the event timeout in milliseconds |
transformMessage | Object transformMessage(Class outputType) throws TransformerException(Code) | | Transforms the message into the requested format. The transformer used is
the one configured on the endpoint through which this event was received.
Parameters: outputType - The requested output type. the message transformed into it's recognised or expected format. throws: TransformerException - if a failure occurs in the transformer See Also: org.mule.api.transformer.Transformer |
transformMessageToBytes | byte[] transformMessageToBytes() throws TransformerException(Code) | | Transforms the message into it's recognised or expected format and then
into an array of bytes. The transformer used is the one configured on the
endpoint through which this event was received.
the message transformed into it's recognised or expected format as anarray of bytes. throws: TransformerException - if a failure occurs in the transformer See Also: org.mule.api.transformer.Transformer |
transformMessageToString | String transformMessageToString() throws TransformerException(Code) | | Returns the message transformed into it's recognised or expected format and
then into a String. The transformer used is the one configured on the endpoint
through which this event was received. If necessary this will use the encoding
set on the event
the message transformed into it's recognised or expected format as aStrings. throws: TransformerException - if a failure occurs in the transformer See Also: org.mule.api.transformer.Transformer |
|
|
|