Java Doc for MuleEventContext.java in  » ESB » mule » org » mule » api » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » ESB » mule » org.mule.api 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.mule.api.MuleEventContext

All known Subclasses:   org.mule.DefaultMuleEventContext,
MuleEventContext
public interface MuleEventContext (Code)
MuleEventContext is the context object for the current request. Using the context, developers can send/dispatch/receive events programmatically as well as manage transactions.




Method Summary
 voiddispatchEvent(MuleMessage message)
    
 voiddispatchEvent(Object payload)
    
 voiddispatchEvent(MuleMessage message, EndpointURI endpoint)
    
 voiddispatchEvent(MuleMessage message, String endpointName)
     Depending on the session state this methods either Passes an event asynchronously to the next available Mule UMO in the pool or via the endpoint configured for the event.
Parameters:
  message - the event message payload to send
Parameters:
  endpointName - The endpoint name to disptch the event through.
 voiddispatchEvent(MuleMessage message, OutboundEndpoint endpoint)
    
 TransactiongetCurrentTransaction()
    
 StringgetEncoding()
     Gets the encoding for the current message.
 EndpointURIgetEndpointURI()
    
 MuleMessagegetMessage()
    
 byte[]getMessageAsBytes()
     Returns the contents of the message as a byte array.
 StringgetMessageAsString()
    
 StringgetMessageAsString(String encoding)
    
 MuleContextgetMuleContext()
    
 OutputStreamgetOutputStream()
     An outputstream the can optionally be used write response data to an incoming message.
 ServicegetService()
    
 MuleSessiongetSession()
    
 intgetTimeout()
    
 TransactiongetTransaction()
    
 booleanisStopFurtherProcessing()
     Determines whether the default processing for this event will be executed.
 booleanisSynchronous()
    
 voidmarkTransactionForRollback()
    
 MuleMessagerequestEvent(InboundEndpoint endpoint, long timeout)
     Requests a synchronous receive of an event on the service.
 MuleMessagerequestEvent(String endpointName, long timeout)
     Requests a synchronous receive of an event on the service.
 MuleMessagerequestEvent(EndpointURI endpoint, long timeout)
     Requests a synchronous receive of an event on the service.
 MuleMessagesendEvent(Object message)
    
 MuleMessagesendEvent(MuleMessage message)
    
 MuleMessagesendEvent(MuleMessage message, EndpointURI endpoint)
    
 MuleMessagesendEvent(MuleMessage message, String endpointName)
     Depending on the session state this methods either Passes an event synchronously to the next available Mule UMO in the pool or via the endpoint configured for the event
Parameters:
  message - the event message payload to send
Parameters:
  endpointName - The endpoint name to disptch the event through.
 MuleMessagesendEvent(MuleMessage message, OutboundEndpoint endpoint)
     Depending on the session state this methods either Passes an event synchronously to the next available Mule UMO in the pool or via the endpoint configured for the event
Parameters:
  message - the event message payload to send
Parameters:
  endpoint - The endpoint to disptch the event through.
 FutureMessageResultsendEventAsync(Object message, int timeout)
     sends an event request via the configured outbound router for this service. This method return immediately, but the result of the event invocation available from the returned a Future result that can be accessed later by the the returned FutureMessageResult.
 FutureMessageResultsendEventAsync(MuleMessage message, int timeout)
     sends an event request via the configured outbound router for this service. This method return immediately, but the result of the event invocation available from the returned a Future result that can be accessed later by the the returned FutureMessageResult.
 FutureMessageResultsendEventAsync(MuleMessage message, EndpointURI endpoint, int timeout)
     sends an event request via the configured outbound router for this service. This method return immediately, but the result of the event invocation available from the returned a Future result that can be accessed later by the the returned FutureMessageResult.
 FutureMessageResultsendEventAsync(MuleMessage message, String endpointName, int timeout)
     sends an event request via the configured outbound router for this service. This method return immediately, but the result of the event invocation available from the returned a Future result that can be accessed later by the the returned FutureMessageResult.
 voidsetStopFurtherProcessing(boolean stopFurtherProcessing)
     Determines whether the default processing for this event will be executed.
 ObjecttransformMessage()
     Returns the message transformed into it's recognised or expected format.
 ObjecttransformMessage(Class expectedType)
     Returns the message transformed into it's recognised or expected format.
 byte[]transformMessageToBytes()
     Returns the message transformed into it's recognised or expected format and then into an array of bytes.
 StringtransformMessageToString()
     Returns the message transformed into it's recognised or expected format and then into a String.



Method Detail
dispatchEvent
void dispatchEvent(MuleMessage message) throws MuleException(Code)
This will dispatch an event asynchronously via the configured outbound endpoint on the service for this session
Parameters:
  message - the message to send
throws:
  MuleException - if there is no outbound endpoint configured on theservice or the events fails during dispatch



dispatchEvent
void dispatchEvent(Object payload) throws MuleException(Code)
This will dispatch an event asynchronously via the configured outbound endpoint on the service for this session
Parameters:
  payload - the message payloadto send
throws:
  MuleException - if there is no outbound endpoint configured on theservice or the events fails during dispatch



dispatchEvent
void dispatchEvent(MuleMessage message, EndpointURI endpoint) throws MuleException(Code)
Depending on the session state this methods either Passes an event asynchronously to the next available Mule UMO in the pool or via the endpoint configured for the event
Parameters:
  message - the event message payload to send
Parameters:
  endpoint - the endpointUri to dispatc the event to first on the serviceconfiguration and then on the mule manager configuration
throws:
  MuleException - if the event fails to be processed by the service orthe transport for the endpoint



dispatchEvent
void dispatchEvent(MuleMessage message, String endpointName) throws MuleException(Code)
Depending on the session state this methods either Passes an event asynchronously to the next available Mule UMO in the pool or via the endpoint configured for the event.
Parameters:
  message - the event message payload to send
Parameters:
  endpointName - The endpoint name to disptch the event through. This willbe looked up first on the service configuration and then on themule manager configuration
throws:
  MuleException - if the event fails to be processed by the service orthe transport for the endpoint



dispatchEvent
void dispatchEvent(MuleMessage message, OutboundEndpoint endpoint) throws MuleException(Code)
Depending on the session state this methods either Passes an event asynchronously to the next available Mule UMO in the pool or via the endpoint configured for the event
Parameters:
  message - the event message payload to send
Parameters:
  endpoint - The endpoint name to disptch the event through.
throws:
  MuleException - if the event fails to be processed by the service orthe transport for the endpoint



getCurrentTransaction
Transaction getCurrentTransaction()(Code)
Returns the current transaction (if any) for the session the current transaction for the session or null if there is notransaction in progress



getEncoding
String getEncoding()(Code)
Gets the encoding for the current message. For potocols that send encoding Information with the message, this method should be overriden to expose the transport encoding, otherwise the default encoding in the Mule configuration will be used the encoding for this message. This method must never return null



getEndpointURI
EndpointURI getEndpointURI()(Code)
Returns a reference to the Endpoint Uri for this context This is the endpoint on which the event was received the receive endpoint for this event context



getMessage
MuleMessage getMessage()(Code)
Returns the message payload for this event the message payload for this event



getMessageAsBytes
byte[] getMessageAsBytes() throws MuleException(Code)
Returns the contents of the message as a byte array. the contents 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 This method 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 transforming the message the message contents as a string
throws:
  MuleException - if the message cannot be converted into a string



getMuleContext
MuleContext getMuleContext()(Code)



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



getService
Service getService()(Code)



getSession
MuleSession getSession()(Code)



getTimeout
int getTimeout()(Code)
Get the timeout value associated with the event the timeout for the event



getTransaction
Transaction getTransaction()(Code)
Returns the transaction for the current event or null if there is no transaction in progresss the transaction for the current event or null if there is notransaction in progresss



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



markTransactionForRollback
void markTransactionForRollback() throws TransactionException(Code)
Mark the current transaction (if any) for rollback
throws:
  TransactionException -



requestEvent
MuleMessage requestEvent(InboundEndpoint endpoint, long timeout) throws MuleException(Code)
Requests a synchronous receive of an event on the service.
Parameters:
  endpoint - the endpoint identifying the endpointUri on which the eventwill be received
Parameters:
  timeout - time in milliseconds before the request times out The requested event or null if the request times out
throws:
  MuleException - if the request operation fails



requestEvent
MuleMessage requestEvent(String endpointName, long timeout) throws MuleException(Code)
Requests a synchronous receive of an event on the service.
Parameters:
  endpointName - the endpoint identifying the endpointUri on which theevent will be received
Parameters:
  timeout - time in milliseconds before the request timesout The requested event or null if the request times out
throws:
  MuleException - if the request operation fails



requestEvent
MuleMessage requestEvent(EndpointURI endpoint, long timeout) throws MuleException(Code)
Requests a synchronous receive of an event on the service.
Parameters:
  endpoint - the endpointUri on which the event will be received
Parameters:
  timeout - time in milliseconds before the request timesout The requested event or null if the request times out
throws:
  MuleException - if the request operation fails



sendEvent
MuleMessage sendEvent(Object message) throws MuleException(Code)
This will send an event via the configured outbound router on the service
Parameters:
  message - the message to send the result of the send if any
throws:
  MuleException - if there is no outbound endpoint configured on theservice or the events fails during dispatch



sendEvent
MuleMessage sendEvent(MuleMessage message) throws MuleException(Code)
Depending on the session state this methods either Passes an event synchronously to the next available Mule UMO in the pool or via the endpoint configured for the event
Parameters:
  message - the message payload to send the return Message from the call or null if there was no result
throws:
  MuleException - if the event fails to be processed by the service orthe transport for the endpoint



sendEvent
MuleMessage sendEvent(MuleMessage message, EndpointURI endpoint) throws MuleException(Code)
Depending on the session state this methods either Passes an event synchronously to the next available Mule UMO in the pool or via the endpoint configured for the event
Parameters:
  message - the event message payload to send
Parameters:
  endpoint - The endpointUri to disptch the event through the return Message from the call or null if there was no result
throws:
  MuleException - if the event fails to be processed by the service orthe transport for the endpoint



sendEvent
MuleMessage sendEvent(MuleMessage message, String endpointName) throws MuleException(Code)
Depending on the session state this methods either Passes an event synchronously to the next available Mule UMO in the pool or via the endpoint configured for the event
Parameters:
  message - the event message payload to send
Parameters:
  endpointName - The endpoint name to disptch the event through. This willbe looked up first on the service configuration and then on themule manager configuration the return Message from the call or null if there was no result
throws:
  MuleException - if the event fails to be processed by the service orthe transport for the endpoint



sendEvent
MuleMessage sendEvent(MuleMessage message, OutboundEndpoint endpoint) throws MuleException(Code)
Depending on the session state this methods either Passes an event synchronously to the next available Mule UMO in the pool or via the endpoint configured for the event
Parameters:
  message - the event message payload to send
Parameters:
  endpoint - The endpoint to disptch the event through. the return Message from the call or null if there was no result
throws:
  MuleException - if the event fails to be processed by the service orthe transport for the endpoint



sendEventAsync
FutureMessageResult sendEventAsync(Object message, int timeout) throws MuleException(Code)
sends an event request via the configured outbound router for this service. This method return immediately, but the result of the event invocation available from the returned a Future result that can be accessed later by the the returned FutureMessageResult. the Future messageResult can be queried at any time to check that the invocation has completed. A timeout is associated with the invocation, which is the maximum time in milli-seconds that the invocation should take to complete
Parameters:
  message - the object that is the payload of the event
Parameters:
  timeout - how long to block in milliseconds waiting for a result the result message if any of the invocation
throws:
  org.mule.api.MuleException - if the dispatch fails or the components ortransfromers cannot be found
See Also:   FutureMessageResult



sendEventAsync
FutureMessageResult sendEventAsync(MuleMessage message, int timeout) throws MuleException(Code)
sends an event request via the configured outbound router for this service. This method return immediately, but the result of the event invocation available from the returned a Future result that can be accessed later by the the returned FutureMessageResult. the Future messageResult can be queried at any time to check that the invocation has completed. A timeout is associated with the invocation, which is the maximum time in milli-seconds that the invocation should take to complete
Parameters:
  message - the MuleMessage of the event
Parameters:
  timeout - how long to block in milliseconds waiting for a result the result message if any of the invocation
throws:
  org.mule.api.MuleException - if the dispatch fails or the components ortransfromers cannot be found
See Also:   FutureMessageResult



sendEventAsync
FutureMessageResult sendEventAsync(MuleMessage message, EndpointURI endpoint, int timeout) throws MuleException(Code)
sends an event request via the configured outbound router for this service. This method return immediately, but the result of the event invocation available from the returned a Future result that can be accessed later by the the returned FutureMessageResult. the Future messageResult can be queried at any time to check that the invocation has completed. A timeout is associated with the invocation, which is the maximum time in milli-seconds that the invocation should take to complete
Parameters:
  message - the MuleMessage of the event
Parameters:
  endpoint - the endpointUri to dispatch to
Parameters:
  timeout - how long to block in milliseconds waiting for a result the result message if any of the invocation
throws:
  org.mule.api.MuleException - if the dispatch fails or the components ortransfromers cannot be found
See Also:   FutureMessageResult



sendEventAsync
FutureMessageResult sendEventAsync(MuleMessage message, String endpointName, int timeout) throws MuleException(Code)
sends an event request via the configured outbound router for this service. This method return immediately, but the result of the event invocation available from the returned a Future result that can be accessed later by the the returned FutureMessageResult. the Future messageResult can be queried at any time to check that the invocation has completed. A timeout is associated with the invocation, which is the maximum time in milli-seconds that the invocation should take to complete
Parameters:
  message - the MuleMessage of the event
Parameters:
  endpointName - The endpoint name to disptch the event through. This willbe looked up first on the service configuration and then on themule manager configuration
Parameters:
  timeout - how long to block in milliseconds waiting for a result the result message if any of the invocation
throws:
  org.mule.api.MuleException - if the dispatch fails or the components ortransfromers cannot be found
See Also:   FutureMessageResult



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.



transformMessage
Object transformMessage() throws TransformerException(Code)
Returns the message transformed into it's recognised or expected format. 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.
throws:
  org.mule.api.transformer.TransformerException - if a failure occurs inthe transformer
See Also:   org.mule.api.transformer.Transformer



transformMessage
Object transformMessage(Class expectedType) throws TransformerException(Code)
Returns the message transformed into it's recognised or expected format. The transformer used is the one configured on the endpoint through which this event was received.
Parameters:
  expectedType - The class type required for the return object. This paramjust provides a convienient way to manage type casting oftransformed objects the message transformed into it's recognised or expected format.
throws:
  org.mule.api.transformer.TransformerException - if a failure occurs orif the return type is not the same as the expected type in thetransformer
See Also:   org.mule.api.transformer.Transformer



transformMessageToBytes
byte[] transformMessageToBytes() throws TransformerException(Code)
Returns the message transformed 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. This method 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



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.