|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface 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 MuleEvent.
MuleMessage
Field Summary | |
---|---|
static int |
TIMEOUT_DO_NOT_WAIT
|
static int |
TIMEOUT_NOT_SET_VALUE
|
static int |
TIMEOUT_WAIT_FOREVER
|
Method Summary | |
---|---|
Credentials |
getCredentials()
|
String |
getEncoding()
Gets the encoding for this message. |
ImmutableEndpoint |
getEndpoint()
Gets the endpoint associated with this event |
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()
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 |
MuleContext |
getMuleContext()
Returns the muleContext for the Mule node that this event was received in |
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,
Object defaultValue)
Gets a property associated with the current event. |
Service |
getService()
Retrieves the service for the current event |
MuleSession |
getSession()
Retrieves the service session for the current event |
int |
getTimeout()
The number of milliseconds to wait for a return event when running synchronously. |
boolean |
isStopFurtherProcessing()
Determines whether the default processing for this event will be executed. |
boolean |
isSynchronous()
Determines whether the was sent synchrounously or not |
void |
setStopFurtherProcessing(boolean stopFurtherProcessing)
Determines whether the default processing for this event will be executed. |
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. |
Object |
transformMessage()
Transforms the message into it's recognised or expected format. |
Object |
transformMessage(Class outputType)
Transforms the message into the requested format. |
byte[] |
transformMessageToBytes()
Transforms the message into it's recognised or expected format and then into an array of bytes. |
String |
transformMessageToString()
Returns the message transformed into it's recognised or expected format and then into a String. |
Field Detail |
---|
static final int TIMEOUT_WAIT_FOREVER
static final int TIMEOUT_DO_NOT_WAIT
static final int TIMEOUT_NOT_SET_VALUE
Method Detail |
---|
MuleMessage getMessage()
Credentials getCredentials()
byte[] getMessageAsBytes() throws MuleException
MuleException
- if the message cannot be converted into an array of bytesObject transformMessage() throws TransformerException
TransformerException
- if a failure occurs in the transformerTransformer
Object transformMessage(Class outputType) throws TransformerException
outputType
- The requested output type.
TransformerException
- if a failure occurs in the transformerTransformer
byte[] transformMessageToBytes() throws TransformerException
TransformerException
- if a failure occurs in the transformerTransformer
String transformMessageToString() throws TransformerException
TransformerException
- if a failure occurs in the transformerTransformer
String getMessageAsString() throws MuleException
MuleException
- if the message cannot be converted into a stringString getMessageAsString(String encoding) throws MuleException
encoding
- the encoding to use when converting the message to string
MuleException
- if the message cannot be converted into a stringString getId()
Object getProperty(String name)
name
- the property name
Object getProperty(String name, Object defaultValue)
name
- the property namedefaultValue
- a default value if the property doesn't exist in the event
ImmutableEndpoint getEndpoint()
MuleSession getSession()
Service getService()
boolean isStopFurtherProcessing()
org.mule.api.lifecycle.Callable
or calling
RequestContext.getEventContext
to obtain the MuleEventContext for
the current thread. The user can programmatically control how events are
dispached.
MuleContext
,
MuleEventContext
,
Callable
void setStopFurtherProcessing(boolean stopFurtherProcessing)
org.mule.api.lifecycle.Callable
or calling
RequestContext.getEventContext
to obtain the MuleEventContext for
the current thread. The user can programmatically control how events are
dispached.
stopFurtherProcessing
- the value to set.boolean isSynchronous()
void setSynchronous(boolean value)
value
- true if the event is synchronousint getTimeout()
void setTimeout(int timeout)
timeout
- the event timeout in millisecondsOutputStream getOutputStream()
String getEncoding()
MuleContext getMuleContext()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |