@ManagedResource(description="Managed TimerEndpoint")
@UriEndpoint(firstVersion="1.0.0",
scheme="timer",
title="Timer",
syntax="timer:timerName",
consumerOnly=true,
label="core,scheduling")
public class TimerEndpoint
extends org.apache.camel.support.DefaultEndpoint
implements org.apache.camel.MultipleConsumersSupport
| Modifier | Constructor and Description |
|---|---|
|
TimerEndpoint() |
protected |
TimerEndpoint(String endpointUri,
org.apache.camel.Component component) |
|
TimerEndpoint(String uri,
org.apache.camel.Component component,
String timerName) |
| 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() |
TimerComponent |
getComponent() |
long |
getDelay() |
String |
getPattern() |
long |
getPeriod() |
long |
getRepeatCount() |
Date |
getTime() |
Timer |
getTimer() |
Timer |
getTimer(TimerConsumer consumer) |
String |
getTimerName() |
boolean |
isDaemon() |
boolean |
isFixedRate() |
boolean |
isMultipleConsumersSupported() |
void |
removeTimer(TimerConsumer consumer) |
void |
setDaemon(boolean daemon)
Specifies whether or not the thread associated with the timer endpoint runs as a daemon.
|
void |
setDelay(long delay)
The number of milliseconds to wait before the first event is generated.
|
void |
setFixedRate(boolean fixedRate)
Events take place at approximately regular intervals, separated by the specified period.
|
void |
setPattern(String pattern)
Allows you to specify a custom Date pattern to use for setting the time option using URI syntax.
|
void |
setPeriod(long period)
If greater than 0, generate periodic events every period milliseconds.
|
void |
setRepeatCount(long repeatCount)
Specifies a maximum limit of number of fires.
|
void |
setTime(Date time)
A java.util.Date the first event should be generated.
|
void |
setTimer(Timer timer)
To use a custom
Timer |
void |
setTimerName(String timerName)
The name of the timer
|
configureConsumer, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, equals, getCamelContext, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isBasicPropertyBinding, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isSingleton, isSynchronous, setBasicPropertyBinding, setBridgeErrorHandler, setCamelContext, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toStringbuild, doBuild, doResume, doShutdown, doSuspend, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendpublic TimerEndpoint()
public TimerEndpoint(String uri, org.apache.camel.Component component, String timerName)
protected TimerEndpoint(String endpointUri, org.apache.camel.Component component)
public TimerComponent getComponent()
getComponent in class org.apache.camel.support.DefaultEndpointpublic org.apache.camel.Producer createProducer()
throws Exception
createProducer in interface org.apache.camel.EndpointExceptionpublic org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor)
throws Exception
createConsumer in interface org.apache.camel.EndpointExceptionprotected void doStart()
throws Exception
doStart in class org.apache.camel.support.DefaultEndpointExceptionprotected void doStop()
throws Exception
doStop in class org.apache.camel.support.DefaultEndpointException@ManagedAttribute public boolean isMultipleConsumersSupported()
isMultipleConsumersSupported in interface org.apache.camel.MultipleConsumersSupport@ManagedAttribute(description="Timer Name") public String getTimerName()
@ManagedAttribute(description="Timer Name") public void setTimerName(String timerName)
@ManagedAttribute(description="Timer Daemon") public boolean isDaemon()
@ManagedAttribute(description="Timer Daemon") public void setDaemon(boolean daemon)
@ManagedAttribute(description="Timer Delay") public long getDelay()
@ManagedAttribute(description="Timer Delay") public void setDelay(long delay)
@ManagedAttribute(description="Timer FixedRate") public boolean isFixedRate()
@ManagedAttribute(description="Timer FixedRate") public void setFixedRate(boolean fixedRate)
@ManagedAttribute(description="Timer Period") public long getPeriod()
@ManagedAttribute(description="Timer Period") public void setPeriod(long period)
@ManagedAttribute(description="Repeat Count") public long getRepeatCount()
@ManagedAttribute(description="Repeat Count") public void setRepeatCount(long repeatCount)
public Date getTime()
public void setTime(Date time)
public String getPattern()
public void setPattern(String pattern)
public Timer getTimer()
public Timer getTimer(TimerConsumer consumer)
public void removeTimer(TimerConsumer consumer)
Apache Camel