@UriEndpoint(firstVersion="2.12.0",
scheme="quartz",
title="Quartz",
syntax="quartz:groupName/triggerName",
consumerOnly=true,
category=SCHEDULING)
public class QuartzEndpoint
extends org.apache.camel.support.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() |
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 |
isPauseJob() |
boolean |
isPrefixJobNameWithEndpointId() |
boolean |
isRecoverableJob() |
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 |
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 |
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) |
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, configureExchange, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, equals, getCamelContext, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isPollingConsumerCopy, isSingleton, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerCopy, setPollingConsumerQueueSize, setProperties, toString
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public QuartzEndpoint(String uri, QuartzComponent quartzComponent)
public String getGroupName()
public String getTriggerName()
public void setTriggerName(String triggerName)
public String getCron()
public boolean isStateful()
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 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 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
protected void doStart() throws Exception
doStart
in class org.apache.camel.support.DefaultEndpoint
Exception
protected void doStop() throws Exception
doStop
in class org.apache.camel.support.DefaultEndpoint
Exception
public QuartzComponent getComponent()
getComponent
in class org.apache.camel.support.DefaultEndpoint
public void onConsumerStart(QuartzConsumer quartzConsumer) throws Exception
Exception
public void onConsumerStop(QuartzConsumer quartzConsumer) throws Exception
Exception
Apache Camel