public class QuartzComponent
extends org.apache.camel.impl.UriEndpointComponent
implements org.apache.camel.ExtendedStartupListener
This component uses Quartz 2.x API and provide all the features from "camel-quartz". It has reused some of the code, but mostly has been re-written in attempt to be more easier to maintain, and use Quartz more fully.
Constructor and Description |
---|
QuartzComponent() |
QuartzComponent(org.apache.camel.CamelContext camelContext) |
Modifier and Type | Method and Description |
---|---|
protected org.apache.camel.Endpoint |
createEndpoint(String uri,
String remaining,
Map<String,Object> parameters) |
protected String |
createInstanceName(Properties prop) |
protected void |
doStart() |
protected void |
doStartScheduler() |
protected void |
doStop() |
Properties |
getProperties() |
String |
getPropertiesFile() |
org.quartz.Scheduler |
getScheduler() |
org.quartz.SchedulerFactory |
getSchedulerFactory() |
int |
getStartDelayedSeconds() |
boolean |
isAutoStartScheduler() |
boolean |
isClustered()
Is the quartz scheduler clustered?
|
boolean |
isEnableJmx() |
boolean |
isInterruptJobsOnShutdown() |
boolean |
isPrefixInstanceName() |
boolean |
isPrefixJobNameWithEndpointId() |
void |
onCamelContextFullyStarted(org.apache.camel.CamelContext context,
boolean alreadyStarted) |
void |
onCamelContextStarted(org.apache.camel.CamelContext context,
boolean alreadyStarted) |
void |
setAutoStartScheduler(boolean autoStartScheduler)
Whether or not the scheduler should be auto started.
|
void |
setEnableJmx(boolean enableJmx)
Whether to enable Quartz JMX which allows to manage the Quartz scheduler from JMX.
|
void |
setInterruptJobsOnShutdown(boolean interruptJobsOnShutdown)
Whether to interrupt jobs on shutdown which forces the scheduler to shutdown quicker and attempt to interrupt any running jobs.
|
void |
setPrefixInstanceName(boolean prefixInstanceName)
Whether to prefix the Quartz Scheduler instance name with the CamelContext name.
|
void |
setPrefixJobNameWithEndpointId(boolean prefixJobNameWithEndpointId)
Whether to prefix the quartz job with the endpoint id.
|
void |
setProperties(Properties properties)
Properties to configure the Quartz scheduler.
|
void |
setPropertiesFile(String propertiesFile)
File name of the properties to load from the classpath
|
void |
setScheduler(org.quartz.Scheduler scheduler)
To use the custom configured Quartz scheduler, instead of creating a new Scheduler.
|
void |
setSchedulerFactory(org.quartz.SchedulerFactory schedulerFactory)
To use the custom SchedulerFactory which is used to create the Scheduler.
|
void |
setStartDelayedSeconds(int startDelayedSeconds)
Seconds to wait before starting the quartz scheduler.
|
createComponentConfiguration, createParameterConfigurationMap, getEndpointClass, getParameterConfigurationMap, populateParameterConfigurationMap, setEndpointClass
afterConfiguration, createConfiguration, createEndpoint, getAndRemoveOrResolveReferenceParameter, getAndRemoveOrResolveReferenceParameter, getAndRemoveParameter, getAndRemoveParameter, getCamelContext, getExtension, getSupportedExtensions, ifStartsWithReturnRemainder, isResolvePropertyPlaceholders, preProcessUri, registerExtension, registerExtension, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceParameter, resolveAndRemoveReferenceParameter, setCamelContext, setProperties, setProperties, setResolvePropertyPlaceholders, useIntrospectionOnEndpoint, useRawUri, validateParameters, validateURI
public QuartzComponent()
public QuartzComponent(org.apache.camel.CamelContext camelContext)
public boolean isAutoStartScheduler()
public void setAutoStartScheduler(boolean autoStartScheduler)
public int getStartDelayedSeconds()
public void setStartDelayedSeconds(int startDelayedSeconds)
public boolean isPrefixJobNameWithEndpointId()
public void setPrefixJobNameWithEndpointId(boolean prefixJobNameWithEndpointId)
public boolean isEnableJmx()
public void setEnableJmx(boolean enableJmx)
public Properties getProperties()
public void setProperties(Properties properties)
public String getPropertiesFile()
public void setPropertiesFile(String propertiesFile)
public boolean isPrefixInstanceName()
public void setPrefixInstanceName(boolean prefixInstanceName)
public boolean isInterruptJobsOnShutdown()
public void setInterruptJobsOnShutdown(boolean interruptJobsOnShutdown)
public org.quartz.SchedulerFactory getSchedulerFactory() throws org.quartz.SchedulerException
org.quartz.SchedulerException
protected String createInstanceName(Properties prop)
public boolean isClustered() throws org.quartz.SchedulerException
org.quartz.SchedulerException
public void setSchedulerFactory(org.quartz.SchedulerFactory schedulerFactory)
public org.quartz.Scheduler getScheduler()
public void setScheduler(org.quartz.Scheduler scheduler)
protected org.apache.camel.Endpoint createEndpoint(String uri, String remaining, Map<String,Object> parameters) throws Exception
createEndpoint
in class org.apache.camel.impl.DefaultComponent
Exception
protected void doStart() throws Exception
doStart
in class org.apache.camel.impl.DefaultComponent
Exception
protected void doStop() throws Exception
doStop
in class org.apache.camel.impl.DefaultComponent
Exception
public void onCamelContextStarted(org.apache.camel.CamelContext context, boolean alreadyStarted) throws Exception
onCamelContextStarted
in interface org.apache.camel.StartupListener
Exception
public void onCamelContextFullyStarted(org.apache.camel.CamelContext context, boolean alreadyStarted) throws Exception
onCamelContextFullyStarted
in interface org.apache.camel.ExtendedStartupListener
Exception
Apache Camel