org.apache.camel.component.quartz
Class QuartzComponent
java.lang.Object
org.apache.camel.support.ServiceSupport
org.apache.camel.impl.DefaultComponent
org.apache.camel.component.quartz.QuartzComponent
- All Implemented Interfaces:
- org.apache.camel.CamelContextAware, org.apache.camel.Component, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.StartupListener, org.apache.camel.StatefulService, org.apache.camel.SuspendableService
public class QuartzComponent
- extends org.apache.camel.impl.DefaultComponent
- implements org.apache.camel.StartupListener
A Quartz Component
For a brief tutorial on setting cron expression see
Quartz cron tutorial.
- Version:
Fields inherited from class org.apache.camel.support.ServiceSupport |
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending |
Methods inherited from class org.apache.camel.impl.DefaultComponent |
afterConfiguration, createComponentConfiguration, createConfiguration, createEndpoint, getAndRemoveOrResolveReferenceParameter, getAndRemoveOrResolveReferenceParameter, getAndRemoveParameter, getAndRemoveParameter, getCamelContext, ifStartsWithReturnRemainder, preProcessUri, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceParameter, resolveAndRemoveReferenceParameter, setCamelContext, setProperties, useIntrospectionOnEndpoint, useRawUri, validateParameters, validateURI |
Methods inherited from class org.apache.camel.support.ServiceSupport |
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, resume, shutdown, start, stop, suspend |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
QuartzComponent
public QuartzComponent()
QuartzComponent
public QuartzComponent(org.apache.camel.CamelContext context)
createEndpoint
protected QuartzEndpoint createEndpoint(String uri,
String remaining,
Map<String,Object> parameters)
throws Exception
- Specified by:
createEndpoint
in class org.apache.camel.impl.DefaultComponent
- Throws:
Exception
createCronTrigger
protected org.quartz.CronTrigger createCronTrigger(String path)
throws ParseException
- Throws:
ParseException
onCamelContextStarted
public void onCamelContextStarted(org.apache.camel.CamelContext camelContext,
boolean alreadyStarted)
throws Exception
- Specified by:
onCamelContextStarted
in interface org.apache.camel.StartupListener
- Throws:
Exception
doStart
protected void doStart()
throws Exception
- Overrides:
doStart
in class org.apache.camel.impl.DefaultComponent
- Throws:
Exception
doStop
protected void doStop()
throws Exception
- Overrides:
doStop
in class org.apache.camel.impl.DefaultComponent
- Throws:
Exception
addJob
public void addJob(org.quartz.JobDetail job,
org.quartz.Trigger trigger)
throws org.quartz.SchedulerException
- Throws:
org.quartz.SchedulerException
pauseJob
public void pauseJob(org.quartz.Trigger trigger)
throws org.quartz.SchedulerException
- Throws:
org.quartz.SchedulerException
deleteJob
public void deleteJob(String name,
String group)
throws org.quartz.SchedulerException
- Throws:
org.quartz.SchedulerException
shutdownScheduler
public void shutdownScheduler()
throws org.quartz.SchedulerException
- To force shutdown the quartz scheduler
- Throws:
org.quartz.SchedulerException
- can be thrown if error shutting down
isClustered
public boolean isClustered()
throws org.quartz.SchedulerException
- Is the quartz scheduler clustered?
- Throws:
org.quartz.SchedulerException
startScheduler
public void startScheduler()
throws org.quartz.SchedulerException
- To force starting the quartz scheduler
- Throws:
org.quartz.SchedulerException
- can be thrown if error starting
getFactory
public org.quartz.SchedulerFactory getFactory()
throws org.quartz.SchedulerException
- Throws:
org.quartz.SchedulerException
setFactory
public void setFactory(org.quartz.SchedulerFactory factory)
getScheduler
public org.quartz.Scheduler getScheduler()
throws org.quartz.SchedulerException
- Throws:
org.quartz.SchedulerException
setScheduler
public void setScheduler(org.quartz.Scheduler scheduler)
getProperties
public Properties getProperties()
setProperties
public void setProperties(Properties properties)
getPropertiesFile
public String getPropertiesFile()
setPropertiesFile
public void setPropertiesFile(String propertiesFile)
getStartDelayedSeconds
public int getStartDelayedSeconds()
setStartDelayedSeconds
public void setStartDelayedSeconds(int startDelayedSeconds)
isAutoStartScheduler
public boolean isAutoStartScheduler()
setAutoStartScheduler
public void setAutoStartScheduler(boolean autoStartScheduler)
isEnableJmx
public boolean isEnableJmx()
setEnableJmx
public void setEnableJmx(boolean enableJmx)
loadProperties
protected Properties loadProperties()
throws org.quartz.SchedulerException
- Throws:
org.quartz.SchedulerException
createSchedulerFactory
protected org.quartz.SchedulerFactory createSchedulerFactory()
throws org.quartz.SchedulerException
- Throws:
org.quartz.SchedulerException
createInstanceName
protected String createInstanceName(Properties prop)
createScheduler
protected org.quartz.Scheduler createScheduler()
throws org.quartz.SchedulerException
- Throws:
org.quartz.SchedulerException
Apache Camel