org.apache.camel.processor.interceptor
Class Delayer

java.lang.Object
  extended by org.apache.camel.processor.interceptor.Delayer
All Implemented Interfaces:
InterceptStrategy

public class Delayer
extends Object
implements InterceptStrategy

An interceptor strategy for delaying routes.


Constructor Summary
Delayer()
           
Delayer(long delay)
           
 
Method Summary
 long getDelay()
           
static DelayInterceptor getDelayer(CamelContext context)
          A helper method to return the Delayer instance for a given CamelContext if one is enabled
 boolean isEnabled()
           
 void setDelay(long delay)
           
 void setEnabled(boolean enabled)
           
 Processor wrapProcessorInInterceptors(ProcessorType processorType, Processor target)
          This method is invoked by ProcessorType.wrapProcessor(RouteContext, Processor) to give the implementor an opportunity to wrap the target processor in a route.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Delayer

public Delayer()

Delayer

public Delayer(long delay)
Method Detail

getDelayer

public static DelayInterceptor getDelayer(CamelContext context)
A helper method to return the Delayer instance for a given CamelContext if one is enabled

Parameters:
context - the camel context the delayer is connected to
Returns:
the delayer or null if none can be found

wrapProcessorInInterceptors

public Processor wrapProcessorInInterceptors(ProcessorType processorType,
                                             Processor target)
                                      throws Exception
Description copied from interface: InterceptStrategy
This method is invoked by ProcessorType.wrapProcessor(RouteContext, Processor) to give the implementor an opportunity to wrap the target processor in a route.

Specified by:
wrapProcessorInInterceptors in interface InterceptStrategy
Parameters:
processorType - the object that invokes this method
target - the processor to be wrapped
Returns:
processor wrapped with an interceptor or not wrapped
Throws:
Exception - can be thrown

isEnabled

public boolean isEnabled()

setEnabled

public void setEnabled(boolean enabled)

getDelay

public long getDelay()

setDelay

public void setDelay(long delay)


Copyright © 2010 IONA Open Source Community. All Rights Reserved.