org.mule.providers.vm
Class VMMessageReceiver

java.lang.Object
  extended by org.mule.providers.AbstractMessageReceiver
      extended by org.mule.providers.AbstractPollingMessageReceiver
          extended by org.mule.providers.TransactedPollingMessageReceiver
              extended by org.mule.providers.vm.VMMessageReceiver
All Implemented Interfaces:
Disposable, Lifecycle, Startable, Stoppable, UMOConnectable, UMOMessageReceiver

public class VMMessageReceiver
extends TransactedPollingMessageReceiver

VMMessageReceiver is a listener for events from a Mule component which then simply passes the events on to the target component.


Nested Class Summary
protected static class VMMessageReceiver.VMReceiverWorker
           
 
Nested classes/interfaces inherited from class org.mule.providers.TransactedPollingMessageReceiver
TransactedPollingMessageReceiver.MessageProcessorWorker
 
Field Summary
 
Fields inherited from class org.mule.providers.AbstractPollingMessageReceiver
DEFAULT_POLL_FREQUENCY, DEFAULT_POLL_TIMEUNIT, DEFAULT_STARTUP_DELAY, schedules
 
Fields inherited from class org.mule.providers.AbstractMessageReceiver
component, connected, connecting, connectionStrategy, disposing, endpoint, logger, receiverKey, stopped
 
Constructor Summary
VMMessageReceiver(UMOConnector connector, UMOComponent component, UMOEndpoint endpoint)
           
 
Method Summary
protected  PollingReceiverWorker createWork()
           
protected  void doConnect()
           
protected  void doDisconnect()
           
protected  void doDispose()
           
protected  List getMessages()
           
 Object onCall(UMOEvent event)
           
 void onEvent(UMOEvent event)
           
protected  void processMessage(Object msg)
           
protected  void schedule()
          This method registers this receiver for periodic polling ticks with the connectors scheduler.
 
Methods inherited from class org.mule.providers.TransactedPollingMessageReceiver
doStart, isReceiveMessagesInTransaction, isUseMultipleTransactedReceivers, poll, setReceiveMessagesInTransaction, setUseMultipleTransactedReceivers
 
Methods inherited from class org.mule.providers.AbstractPollingMessageReceiver
doStop, getFrequency, getTimeUnit, setFrequency, setTimeUnit, unschedule
 
Methods inherited from class org.mule.providers.AbstractMessageReceiver
applyResponseTransformer, connect, disconnect, dispose, getComponent, getConnectEventId, getConnectionDescription, getConnector, getEndpoint, getEndpointURI, getListener, getReceiverKey, getWorkManager, handleException, handleUnacceptedFilter, isConnected, routeMessage, routeMessage, routeMessage, routeMessage, routeMessage, routeMessage, setComponent, setConnector, setEndpoint, setExceptionDetails, setListener, setReceiverKey, setWorkManager, start, stop, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VMMessageReceiver

public VMMessageReceiver(UMOConnector connector,
                         UMOComponent component,
                         UMOEndpoint endpoint)
                  throws InitialisationException
Throws:
InitialisationException
Method Detail

schedule

protected void schedule()
                 throws RejectedExecutionException,
                        NullPointerException,
                        IllegalArgumentException
Description copied from class: AbstractPollingMessageReceiver
This method registers this receiver for periodic polling ticks with the connectors scheduler. Subclasses can override this in case they want to handle their polling differently.

Overrides:
schedule in class AbstractPollingMessageReceiver
Throws:
RejectedExecutionException
NullPointerException
IllegalArgumentException
See Also:
ScheduledExecutorService#scheduleWithFixedDelay(Runnable, long, long, TimeUnit)}

doDispose

protected void doDispose()
Specified by:
doDispose in class AbstractMessageReceiver

doConnect

protected void doConnect()
                  throws Exception
Specified by:
doConnect in class AbstractMessageReceiver
Throws:
Exception

doDisconnect

protected void doDisconnect()
                     throws Exception
Specified by:
doDisconnect in class AbstractMessageReceiver
Throws:
Exception

onEvent

public void onEvent(UMOEvent event)
             throws UMOException
Throws:
UMOException

onCall

public Object onCall(UMOEvent event)
              throws UMOException
Throws:
UMOException

getMessages

protected List getMessages()
                    throws Exception
Specified by:
getMessages in class TransactedPollingMessageReceiver
Throws:
Exception

processMessage

protected void processMessage(Object msg)
                       throws Exception
Specified by:
processMessage in class TransactedPollingMessageReceiver
Throws:
Exception

createWork

protected PollingReceiverWorker createWork()
Overrides:
createWork in class AbstractPollingMessageReceiver


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