org.mule.transport.polling
Class MessageProcessorPollingMessageReceiver

java.lang.Object
  extended by org.mule.transport.AbstractTransportMessageHandler
      extended by org.mule.transport.AbstractMessageReceiver
          extended by org.mule.transport.AbstractPollingMessageReceiver
              extended by org.mule.transport.polling.MessageProcessorPollingMessageReceiver
All Implemented Interfaces:
Disposable, Initialisable, Lifecycle, LifecycleStateEnabled, Startable, Stoppable, MessageSource, Connectable, MessageReceiver

public class MessageProcessorPollingMessageReceiver
extends AbstractPollingMessageReceiver

Polling MessageSource.

The MessageProcessorPollingMessageReceiver is responsible of creating a Scheduler at the initialization phase. This Scheduler can be stopped/started and executed by using the MuleRegistry interface, this way users can manipulate poll from outside mule server.


Field Summary
protected  MessageProcessorPollingOverride override
           The MessageProcessorPollingOverride that affects the routing of the MuleEvent
static String POLL_OVERRIDE_PROPERTY_NAME
           The InboundEndpoint property for poll that contains the MessageProcessorPollingOverride
static String POLLING_TRANSPORT
           The Polling transport name identifier.
static String SCHEDULER_FACTORY_PROPERTY_NAME
           The InboundEndpoint property for poll that contains the SchedulerFactory
static String SOURCE_MESSAGE_PROCESSOR_PROPERTY_NAME
           The InboundEndpoint property for poll that contains the poll message source.
protected  MessageProcessor sourceMessageProcessor
           The poll message source, configured inside the poll element in the xml configuration.
 
Fields inherited from class org.mule.transport.AbstractPollingMessageReceiver
DEFAULT_POLL_FREQUENCY, DEFAULT_POLL_TIMEUNIT, DEFAULT_STARTUP_DELAY, schedules
 
Fields inherited from class org.mule.transport.AbstractMessageReceiver
defaultInboundTransformers, defaultResponseTransformers, flowConstruct, listener, receiverKey, replyToHandler
 
Fields inherited from class org.mule.transport.AbstractTransportMessageHandler
connected, connector, endpoint, lifecycleManager, logger, muleMessageFactory, retryTemplate
 
Fields inherited from interface org.mule.api.lifecycle.Initialisable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Startable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Stoppable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Disposable
PHASE_NAME
 
Constructor Summary
MessageProcessorPollingMessageReceiver(Connector connector, FlowConstruct flowConstruct, InboundEndpoint endpoint)
           
 
Method Summary
protected  void doDispose()
           
protected  void doInitialise()
           On the Initialization phase it.
protected  void doStart()
           
protected  void doStop()
           
protected  boolean isNewMessage(MuleEvent sourceEvent)
           
 void poll()
           
protected  boolean pollOnPrimaryInstanceOnly()
          If this returns true for a transport, polling for that transport takes place only on the primary instance.
 void pollWith(MuleMessage request)
           
 
Methods inherited from class org.mule.transport.AbstractPollingMessageReceiver
createWork, disableNativeScheduling, getBatchSize, getFrequency, getTimeUnit, performPoll, schedule, setFrequency, setTimeUnit, unschedule
 
Methods inherited from class org.mule.transport.AbstractMessageReceiver
applyInboundTransformers, applyResponseTransformers, connectHandler, createExecutionTemplate, createLifecycleManager, createMuleEvent, doStartHandler, getConnectEventId, getConnectionDescription, getEndpoint, getEndpointURI, getFlowConstruct, getReceiverKey, getReplyToHandler, getWorkManager, handleUnacceptedFilter, initialise, processMessage, propagateRootMessageIdProperty, routeEvent, routeMessage, routeMessage, routeMessage, routeMessage, routeMessage, setEndpoint, setListener, setReceiverKey, shouldConsumeInEveryNode, toString, warnIfMuleClientSendUsed
 
Methods inherited from class org.mule.transport.AbstractTransportMessageHandler
activate, connect, createMuleMessage, createMuleMessage, createMuleMessage, createMuleMessageFactory, createNullMuleMessage, disconnect, dispose, disposeAndLogException, doConnect, doDisconnect, getConnectEventId, getConnector, getLifecycleState, initializeMessageFactory, initializeRetryPolicy, isConnected, isDoThreading, isStarted, isStarting, isStopped, isStopping, passivate, setEndpoint, start, stop, validate, validateConnection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mule.api.transport.MessageReceiver
createMuleMessage, createMuleMessage
 
Methods inherited from interface org.mule.api.transport.Connectable
connect, disconnect, isConnected, validateConnection
 
Methods inherited from interface org.mule.api.lifecycle.Startable
start
 
Methods inherited from interface org.mule.api.lifecycle.Stoppable
stop
 
Methods inherited from interface org.mule.api.lifecycle.Disposable
dispose
 

Field Detail

SOURCE_MESSAGE_PROCESSOR_PROPERTY_NAME

public static final String SOURCE_MESSAGE_PROCESSOR_PROPERTY_NAME

The InboundEndpoint property for poll that contains the poll message source. Which is configured inside the poll element in the XML configuration

See Also:
Constant Field Values

POLL_OVERRIDE_PROPERTY_NAME

public static final String POLL_OVERRIDE_PROPERTY_NAME

The InboundEndpoint property for poll that contains the MessageProcessorPollingOverride

See Also:
Constant Field Values

SCHEDULER_FACTORY_PROPERTY_NAME

public static final String SCHEDULER_FACTORY_PROPERTY_NAME

The InboundEndpoint property for poll that contains the SchedulerFactory

See Also:
Constant Field Values

POLLING_TRANSPORT

public static final String POLLING_TRANSPORT

The Polling transport name identifier. Used to create the scheduler name

See Also:
Constant Field Values

sourceMessageProcessor

protected MessageProcessor sourceMessageProcessor

The poll message source, configured inside the poll element in the xml configuration. i.e.:

 {@code
 
       
 
 


override

protected MessageProcessorPollingOverride override

The MessageProcessorPollingOverride that affects the routing of the MuleEvent

Constructor Detail

MessageProcessorPollingMessageReceiver

public MessageProcessorPollingMessageReceiver(Connector connector,
                                              FlowConstruct flowConstruct,
                                              InboundEndpoint endpoint)
                                       throws CreateException
Throws:
CreateException
Method Detail

poll

public void poll()
          throws Exception
Specified by:
poll in class AbstractPollingMessageReceiver
Throws:
Exception

pollWith

public void pollWith(MuleMessage request)
              throws Exception
Throws:
Exception

doInitialise

protected void doInitialise()
                     throws InitialisationException

On the Initialization phase it.

Overrides:
doInitialise in class AbstractTransportMessageHandler
Throws:
InitialisationException

pollOnPrimaryInstanceOnly

protected boolean pollOnPrimaryInstanceOnly()
Description copied from class: AbstractPollingMessageReceiver
If this returns true for a transport, polling for that transport takes place only on the primary instance.

Overrides:
pollOnPrimaryInstanceOnly in class AbstractPollingMessageReceiver

doStart

protected void doStart()
                throws MuleException
Overrides:
doStart in class AbstractPollingMessageReceiver
Throws:
MuleException

doStop

protected void doStop()
               throws MuleException
Overrides:
doStop in class AbstractPollingMessageReceiver
Throws:
MuleException

doDispose

protected void doDispose()
Overrides:
doDispose in class AbstractMessageReceiver

isNewMessage

protected boolean isNewMessage(MuleEvent sourceEvent)


Copyright © 2003-2014 MuleSoft, Inc.. All Rights Reserved.