org.apache.camel.processor
Class Delayer
java.lang.Object
org.apache.camel.support.ServiceSupport
org.apache.camel.processor.DelegateAsyncProcessor
org.apache.camel.processor.DelayProcessorSupport
org.apache.camel.processor.Delayer
- All Implemented Interfaces:
- AsyncProcessor, DelegateProcessor, Navigate<Processor>, Processor, Service, ShutdownableService, StatefulService, SuspendableService, Traceable
public class Delayer
- extends DelayProcessorSupport
- implements Traceable
A Delayer which
delays processing the exchange until the correct amount of time has elapsed
using an expression to determine the delivery time.
This implementation will block while waiting.
- Version:
Methods inherited from class org.apache.camel.processor.DelayProcessorSupport |
currentSystemTime, delay, doShutdown, doStart, getDelayedCount, handleSleepInterruptedException, isAsyncDelayed, isCallerRunsWhenRejected, process, setAsyncDelayed, setCallerRunsWhenRejected |
Methods inherited from class org.apache.camel.support.ServiceSupport |
doResume, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, resume, shutdown, start, stop, suspend |
Delayer
public Delayer(CamelContext camelContext,
Processor processor,
Expression delay,
ScheduledExecutorService executorService,
boolean shutdownExecutorService)
toString
public String toString()
- Overrides:
toString
in class DelegateAsyncProcessor
getTraceLabel
public String getTraceLabel()
- Description copied from interface:
Traceable
- Gets the trace label used for logging when tracing is enabled.
The label should be short and precise.
- Specified by:
getTraceLabel
in interface Traceable
- Returns:
- the label
getDelay
public Expression getDelay()
getDelayValue
public long getDelayValue()
setDelay
public void setDelay(Expression delay)
calculateDelay
protected long calculateDelay(Exchange exchange)
- Specified by:
calculateDelay
in class DelayProcessorSupport
Apache Camel