org.mule.umo.provider
Interface UMOMessageDispatching

All Known Subinterfaces:
UMOEndpoint, UMOImmutableEndpoint, UMOMessageDispatcher
All Known Implementing Classes:
AbstractMessageDispatcher, ImmutableMuleEndpoint, MuleEndpoint

public interface UMOMessageDispatching

UMOMessageDispatching defines generic methods for dispatching and receiving events. The exact behaviour of the action is defined by the implementing class.

See Also:
UMOImmutableEndpoint, UMOMessageDispatcher

Field Summary
static long RECEIVE_NO_WAIT
           
static long RECEIVE_WAIT_INDEFINITELY
           
 
Method Summary
 void dispatch(UMOEvent event)
          Dispatches an event from the endpoint to the external system
 UMOMessage receive(long timeout)
          Make a specific request to the underlying transport
 UMOMessage send(UMOEvent event)
          Sends an event from the endpoint to the external system
 

Field Detail

RECEIVE_WAIT_INDEFINITELY

public static final long RECEIVE_WAIT_INDEFINITELY
See Also:
Constant Field Values

RECEIVE_NO_WAIT

public static final long RECEIVE_NO_WAIT
See Also:
Constant Field Values
Method Detail

dispatch

public void dispatch(UMOEvent event)
              throws DispatchException
Dispatches an event from the endpoint to the external system

Parameters:
event - The event to dispatch
Throws:
DispatchException - if the event fails to be dispatched

send

public UMOMessage send(UMOEvent event)
                throws DispatchException
Sends an event from the endpoint to the external system

Parameters:
event - The event to send
Returns:
event the response form the external system wrapped in a UMOEvent
Throws:
DispatchException - if the event fails to be dispatched

receive

public UMOMessage receive(long timeout)
                   throws Exception
Make a specific request to the underlying transport

Parameters:
timeout - the maximum time the operation should block before returning. The call should return immediately if there is data available. If no data becomes available before the timeout elapses, null will be returned
Returns:
the result of the request wrapped in a UMOMessage object. Null will be returned if no data was avaialable
Throws:
Exception - if the call to the underlying protocal cuases an exception


Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.