Issue Details (XML | Word | Printable)

Key: MULE-25
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Ross Mason
Reporter: Ross Mason
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Mule

Make programmatic event dispatching a bit more intuitive

Created: 29/May/04 11:01 AM   Updated: 21/Aug/06 09:22 PM
Component/s: Core: Containers
Affects Version/s: 0.9-beta1
Fix Version/s: 0.9

Time Tracking:
Not Specified

Labels:
Similar Issues:


 Description  « Hide
Currently it is possible to programmatically send or dispatch events from objects managed by Mule, but the api is a little clunky and could be more explicit.

I propose adding a new method to the UMOManager called getCurrentEvent() which will return the event associated with the current thread.

Adding two new methods to the UMOSession

UMOEvent sendEvent(Object data, String providerName);

void dispatchEvent(Object data, String providerName);

There are methods already on the UMOSession like these vut the method signatures requires a UMOProviderdescriptor meaning the user user must look up the provider first. With these changes in place the user could dispatch events programmatically by doing the following -

UMOEvent event = MuleManager.getInstance().getCurrentEvent();

UMOEvent returnEvent = event.getSession().sendEvent(request, "purchaseOrderProvider");

PurchaseOrder po = (PurchaseOrder)returnEvent.getTransformedMessage();



 All   Comments   Work Log   Change History   Transitions   FishEye      Sort Order: Ascending order - Click to sort in descending order
Ross Mason added a comment - 29/May/04 12:16 PM
done