public abstract class ScheduledPollEndpoint extends DefaultEndpoint
Endpoint
which creates a ScheduledPollConsumer
Modifier | Constructor and Description |
---|---|
protected |
ScheduledPollEndpoint() |
protected |
ScheduledPollEndpoint(String endpointUri,
org.apache.camel.Component component) |
Modifier and Type | Method and Description |
---|---|
protected void |
configureConsumer(org.apache.camel.Consumer consumer) |
void |
configureProperties(Map<String,Object> options) |
protected void |
configureScheduledPollConsumerProperties(Map<String,Object> options) |
protected void |
doConfigureConsumer(org.apache.camel.Consumer consumer) |
protected void |
doStart() |
protected void |
doStop() |
int |
getBackoffErrorThreshold() |
int |
getBackoffIdleThreshold() |
int |
getBackoffMultiplier() |
long |
getDefaultDelay()
Gets the default delay.
|
long |
getDelay() |
long |
getInitialDelay() |
org.apache.camel.spi.PollingConsumerPollStrategy |
getPollStrategy() |
long |
getRepeatCount() |
org.apache.camel.LoggingLevel |
getRunLoggingLevel() |
ScheduledExecutorService |
getScheduledExecutorService() |
String |
getScheduler() |
Map<String,Object> |
getSchedulerProperties() |
TimeUnit |
getTimeUnit() |
boolean |
isGreedy() |
boolean |
isSendEmptyMessageWhenIdle() |
boolean |
isStartScheduler() |
boolean |
isUseFixedDelay() |
void |
setBackoffErrorThreshold(int backoffErrorThreshold)
The number of subsequent error polls (failed due some error) that should happen before the backoffMultipler should kick-in.
|
void |
setBackoffIdleThreshold(int backoffIdleThreshold)
The number of subsequent idle polls that should happen before the backoffMultipler should kick-in.
|
void |
setBackoffMultiplier(int backoffMultiplier)
To let the scheduled polling consumer backoff if there has been a number of subsequent idles/errors in a row.
|
void |
setDelay(long delay)
Milliseconds before the next poll.
|
void |
setGreedy(boolean greedy)
If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the previous run polled 1 or more messages.
|
void |
setInitialDelay(long initialDelay)
Milliseconds before the first poll starts.
|
void |
setPollStrategy(org.apache.camel.spi.PollingConsumerPollStrategy pollStrategy)
A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation
to control error handling usually occurred during the poll operation before an Exchange have been created
and being routed in Camel.
|
void |
setRepeatCount(long repeatCount)
Specifies a maximum limit of number of fires.
|
void |
setRunLoggingLevel(org.apache.camel.LoggingLevel runLoggingLevel)
The consumer logs a start/complete log line when it polls.
|
void |
setScheduledExecutorService(ScheduledExecutorService scheduledExecutorService)
Allows for configuring a custom/shared thread pool to use for the consumer.
|
void |
setScheduler(String schedulerName)
Allow to plugin a custom org.apache.camel.spi.ScheduledPollConsumerScheduler to use as the scheduler for
firing when the polling consumer runs.
|
void |
setSchedulerProperties(Map<String,Object> schedulerProperties)
To configure additional properties when using a custom scheduler or any of the Quartz, Spring based scheduler.
|
void |
setSendEmptyMessageWhenIdle(boolean sendEmptyMessageWhenIdle)
If the polling consumer did not poll any files, you can enable this option to send an empty message (no body) instead.
|
void |
setStartScheduler(boolean startScheduler)
Whether the scheduler should be auto started.
|
void |
setTimeUnit(TimeUnit timeUnit)
Time unit for initialDelay and delay options.
|
void |
setUseFixedDelay(boolean useFixedDelay)
Controls if fixed delay or fixed rate is used.
|
configurePollingConsumer, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isBasicPropertyBinding, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isSingleton, isSynchronous, setBasicPropertyBinding, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, 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
createConsumer, createProducer, getEndpointBaseUri, isSingletonProducer
protected ScheduledPollEndpoint(String endpointUri, org.apache.camel.Component component)
protected ScheduledPollEndpoint()
protected void configureConsumer(org.apache.camel.Consumer consumer) throws Exception
configureConsumer
in class DefaultEndpoint
Exception
public void configureProperties(Map<String,Object> options)
configureProperties
in interface org.apache.camel.Endpoint
configureProperties
in class DefaultEndpoint
protected void configureScheduledPollConsumerProperties(Map<String,Object> options)
protected void doConfigureConsumer(org.apache.camel.Consumer consumer)
protected void doStart() throws Exception
doStart
in class DefaultEndpoint
Exception
protected void doStop() throws Exception
doStop
in class DefaultEndpoint
Exception
public boolean isStartScheduler()
public void setStartScheduler(boolean startScheduler)
public long getInitialDelay()
public void setInitialDelay(long initialDelay)
public long getDelay()
public void setDelay(long delay)
public long getDefaultDelay()
public TimeUnit getTimeUnit()
public void setTimeUnit(TimeUnit timeUnit)
public boolean isUseFixedDelay()
public void setUseFixedDelay(boolean useFixedDelay)
public org.apache.camel.spi.PollingConsumerPollStrategy getPollStrategy()
public void setPollStrategy(org.apache.camel.spi.PollingConsumerPollStrategy pollStrategy)
public org.apache.camel.LoggingLevel getRunLoggingLevel()
public void setRunLoggingLevel(org.apache.camel.LoggingLevel runLoggingLevel)
public boolean isSendEmptyMessageWhenIdle()
public void setSendEmptyMessageWhenIdle(boolean sendEmptyMessageWhenIdle)
public boolean isGreedy()
public void setGreedy(boolean greedy)
public void setScheduler(String schedulerName)
public String getScheduler()
public void setSchedulerProperties(Map<String,Object> schedulerProperties)
public ScheduledExecutorService getScheduledExecutorService()
public void setScheduledExecutorService(ScheduledExecutorService scheduledExecutorService)
public int getBackoffMultiplier()
public void setBackoffMultiplier(int backoffMultiplier)
public int getBackoffIdleThreshold()
public void setBackoffIdleThreshold(int backoffIdleThreshold)
public int getBackoffErrorThreshold()
public void setBackoffErrorThreshold(int backoffErrorThreshold)
public long getRepeatCount()
public void setRepeatCount(long repeatCount)
Apache Camel