|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mule.api.schedule.SchedulerFactory<T>
T - is the type of the scheduler job (what is the scheduler going to execute)public abstract class SchedulerFactory<T extends Runnable>
Factory of schedulers. Every Scheduler should be created by a SchedulerFactory if the creation process allows post creation hooking.
Once the Factory creates a scheduler it calls a set of SchedulerFactoryPostProcessor that might affect the
instance of the scheduler.
The SchedulerFactory also registers the Scheduler into the mule registry.
| Field Summary | |
|---|---|
protected MuleContext |
context
Mule context. |
protected org.apache.commons.logging.Log |
logger
|
| Constructor Summary | |
|---|---|
SchedulerFactory()
|
|
| Method Summary | |
|---|---|
Scheduler |
create(String name,
T job)
Creates a scheduler for a job and runs all the registered post processors. |
protected abstract Scheduler |
doCreate(String name,
T job)
Template method to delegate the creation of the Scheduler. |
void |
setMuleContext(MuleContext context)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected transient org.apache.commons.logging.Log logger
protected MuleContext context
Mule context. Should never be null. In case of being null then the post processing is discarded
| Constructor Detail |
|---|
public SchedulerFactory()
| Method Detail |
|---|
public final Scheduler create(String name,
T job)
throws SchedulerCreationException
Creates a scheduler for a job and runs all the registered post processors.
job - The Scheduler job that has to be executed.name - The Scheduler name. This name is the one that is going to be use to register the Scheduler
in the MuleRegistry
Scheduler. It must never be null.
SchedulerCreationException - In case after creating and post processing the Scheduler it is null or
in case a SchedulerFactoryPostProcessor fails.
protected abstract Scheduler doCreate(String name,
T job)
Template method to delegate the creation of the Scheduler. This method is thought to create an instance
of a Scheduler. It should not Start/Stop it.
name - job - The Job the Scheduler is going to execute
Scheduler instancepublic void setMuleContext(MuleContext context)
setMuleContext in interface MuleContextAware
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||