public class DefaultSchedulerMessageSource extends org.mule.runtime.api.meta.AbstractAnnotatedObject implements MessageSource, FlowConstructAware, org.mule.runtime.api.source.SchedulerMessageSource, MuleContextAware, org.mule.runtime.api.lifecycle.Initialisable, org.mule.runtime.api.lifecycle.Disposable
Polling MessageSource.
The DefaultSchedulerMessageSource 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.
| Constructor and Description |
|---|
DefaultSchedulerMessageSource(MuleContext muleContext,
PeriodicScheduler scheduler) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose() |
void |
initialise()
On the Initialization phase it.
|
boolean |
isStarted() |
void |
setFlowConstruct(FlowConstruct flowConstruct) |
void |
setListener(Processor listener)
Set the MessageProcessor listener on a message source which will be invoked when a message is received or generated.
|
void |
setMuleContext(MuleContext context) |
void |
start() |
void |
stop() |
void |
trigger() |
getAnnotation, getAnnotations, getLocation, setAnnotationspublic DefaultSchedulerMessageSource(MuleContext muleContext, PeriodicScheduler scheduler)
muleContext - application's contextscheduler - the schedulerpublic void start()
throws org.mule.runtime.api.exception.MuleException
start in interface org.mule.runtime.api.lifecycle.Startableorg.mule.runtime.api.exception.MuleExceptionpublic void stop()
throws org.mule.runtime.api.exception.MuleException
stop in interface org.mule.runtime.api.lifecycle.Stoppableorg.mule.runtime.api.exception.MuleExceptionpublic void trigger()
trigger in interface org.mule.runtime.api.source.SchedulerMessageSourcepublic boolean isStarted()
isStarted in interface org.mule.runtime.api.source.SchedulerMessageSourcepublic void initialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
On the Initialization phase it.
PeriodicScheduler to create the schedulerinitialise in interface org.mule.runtime.api.lifecycle.Initialisableorg.mule.runtime.api.lifecycle.InitialisationExceptionpublic void dispose()
dispose in interface org.mule.runtime.api.lifecycle.Disposablepublic void setFlowConstruct(FlowConstruct flowConstruct)
setFlowConstruct in interface FlowConstructAwarepublic void setMuleContext(MuleContext context)
setMuleContext in interface MuleContextAwarecontext - the Mule node.public void setListener(Processor listener)
MessageSourcesetListener in interface MessageSourceCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.