@UriEndpoint(firstVersion="2.12.0", scheme="quartz2", title="Quartz2", syntax="quartz2:groupName/triggerName", consumerOnly=true, consumerClass=QuartzComponent.class, label="scheduling") public class QuartzEndpoint extends org.apache.camel.impl.DefaultEndpoint
Constructor and Description |
---|
QuartzEndpoint(String uri,
QuartzComponent quartzComponent) |
Modifier and Type | Method and Description |
---|---|
org.apache.camel.Consumer |
createConsumer(org.apache.camel.Processor processor) |
org.apache.camel.Producer |
createProducer() |
protected void |
doStart() |
protected void |
doStop() |
QuartzComponent |
getComponent() |
org.apache.camel.processor.loadbalancer.LoadBalancer |
getConsumerLoadBalancer() |
String |
getCron() |
org.quartz.Calendar |
getCustomCalendar() |
String |
getGroupName() |
Map<String,Object> |
getJobParameters() |
int |
getStartDelayedSeconds() |
org.quartz.TriggerKey |
getTriggerKey() |
String |
getTriggerName() |
Map<String,Object> |
getTriggerParameters() |
long |
getTriggerStartDelay() |
boolean |
isAutoStartScheduler() |
boolean |
isDeleteJob() |
boolean |
isDurableJob() |
boolean |
isFireNow() |
boolean |
isPauseJob() |
boolean |
isPrefixJobNameWithEndpointId() |
boolean |
isRecoverableJob() |
boolean |
isSingleton() |
boolean |
isStateful() |
boolean |
isUsingFixedCamelContextName() |
void |
onConsumerStart(QuartzConsumer quartzConsumer) |
void |
onConsumerStop(QuartzConsumer quartzConsumer) |
void |
pauseTrigger() |
void |
resumeTrigger() |
void |
setAutoStartScheduler(boolean autoStartScheduler)
Whether or not the scheduler should be auto started.
|
void |
setConsumerLoadBalancer(org.apache.camel.processor.loadbalancer.LoadBalancer consumerLoadBalancer) |
void |
setCron(String cron)
Specifies a cron expression to define when to trigger.
|
void |
setCustomCalendar(org.quartz.Calendar customCalendar)
Specifies a custom calendar to avoid specific range of date
|
void |
setDeleteJob(boolean deleteJob)
If set to true, then the trigger automatically delete when route stop.
|
void |
setDurableJob(boolean durableJob)
Whether or not the job should remain stored after it is orphaned (no triggers point to it).
|
void |
setFireNow(boolean fireNow)
If it is true will fire the trigger when the route is start when using SimpleTrigger.
|
void |
setJobParameters(Map<String,Object> jobParameters)
To configure additional options on the job.
|
void |
setPauseJob(boolean pauseJob)
If set to true, then the trigger automatically pauses when route stop.
|
void |
setPrefixJobNameWithEndpointId(boolean prefixJobNameWithEndpointId)
Whether the job name should be prefixed with endpoint id
|
void |
setRecoverableJob(boolean recoverableJob)
Instructs the scheduler whether or not the job should be re-executed if a 'recovery' or 'fail-over' situation is encountered.
|
void |
setStartDelayedSeconds(int startDelayedSeconds)
Seconds to wait before starting the quartz scheduler.
|
void |
setStateful(boolean stateful)
Uses a Quartz @PersistJobDataAfterExecution and @DisallowConcurrentExecution instead of the default job.
|
void |
setTriggerKey(org.quartz.TriggerKey triggerKey) |
void |
setTriggerName(String triggerName)
The quartz timer name to use.
|
void |
setTriggerParameters(Map<String,Object> triggerParameters)
To configure additional options on the trigger.
|
void |
setTriggerStartDelay(long triggerStartDelay)
In case of scheduler has already started, we want the trigger start slightly after current time to
ensure endpoint is fully started before the job kicks in.
|
void |
setUsingFixedCamelContextName(boolean usingFixedCamelContextName)
If it is true, JobDataMap uses the CamelContext name directly to reference the CamelContext,
if it is false, JobDataMap uses use the CamelContext management name which could be changed during the deploy time.
|
configureConsumer, configurePollingConsumer, configureProperties, createEndpointConfiguration, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, equals, getCamelContext, getConsumerProperties, getEndpointConfiguration, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isBridgeErrorHandler, isLenientProperties, isPollingConsumerBlockWhenFull, isSynchronous, setBridgeErrorHandler, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toString
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
public QuartzEndpoint(String uri, QuartzComponent quartzComponent)
public String getGroupName()
public String getTriggerName()
public void setTriggerName(String triggerName)
public String getCron()
public boolean isStateful()
public boolean isFireNow()
public long getTriggerStartDelay()
public boolean isDeleteJob()
public boolean isPauseJob()
public void setPauseJob(boolean pauseJob)
public void setTriggerStartDelay(long triggerStartDelay)
public void setDeleteJob(boolean deleteJob)
public void setFireNow(boolean fireNow)
public void setStateful(boolean stateful)
public boolean isDurableJob()
public void setDurableJob(boolean durableJob)
public boolean isRecoverableJob()
public void setRecoverableJob(boolean recoverableJob)
public boolean isUsingFixedCamelContextName()
public void setUsingFixedCamelContextName(boolean usingFixedCamelContextName)
public org.apache.camel.processor.loadbalancer.LoadBalancer getConsumerLoadBalancer()
public void setConsumerLoadBalancer(org.apache.camel.processor.loadbalancer.LoadBalancer consumerLoadBalancer)
public void setTriggerParameters(Map<String,Object> triggerParameters)
public void setJobParameters(Map<String,Object> jobParameters)
public int getStartDelayedSeconds()
public void setStartDelayedSeconds(int startDelayedSeconds)
public boolean isAutoStartScheduler()
public void setAutoStartScheduler(boolean autoStartScheduler)
public boolean isPrefixJobNameWithEndpointId()
public void setPrefixJobNameWithEndpointId(boolean prefixJobNameWithEndpointId)
prefixJobNameWithEndpointId
- public void setCron(String cron)
public org.quartz.TriggerKey getTriggerKey()
public void setTriggerKey(org.quartz.TriggerKey triggerKey)
public org.quartz.Calendar getCustomCalendar()
public void setCustomCalendar(org.quartz.Calendar customCalendar)
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception
Exception
public boolean isSingleton()
protected void doStart() throws Exception
doStart
in class org.apache.camel.impl.DefaultEndpoint
Exception
protected void doStop() throws Exception
doStop
in class org.apache.camel.impl.DefaultEndpoint
Exception
public QuartzComponent getComponent()
getComponent
in class org.apache.camel.impl.DefaultEndpoint
public void onConsumerStart(QuartzConsumer quartzConsumer) throws Exception
Exception
public void onConsumerStop(QuartzConsumer quartzConsumer) throws Exception
Exception
Apache Camel