Expression delay = createAbsoluteTimeDelayExpression(routeContext);
boolean shutdownThreadPool = ProcessorDefinitionHelper.willCreateNewThreadPool(routeContext, this, isAsyncDelayed());
ScheduledExecutorService threadPool = ProcessorDefinitionHelper.getConfiguredScheduledExecutorService(routeContext, "Delay", this, isAsyncDelayed());
Delayer answer = new Delayer(routeContext.getCamelContext(), childProcessor, delay, threadPool, shutdownThreadPool);
if (getAsyncDelayed() != null) {
answer.setAsyncDelayed(getAsyncDelayed());
}
if (getCallerRunsWhenRejected() == null) {
// should be default true
answer.setCallerRunsWhenRejected(true);
} else {
answer.setCallerRunsWhenRejected(getCallerRunsWhenRejected());
}
return answer;
}