org.apache.camel.bam.rules
Class TemporalRule

java.lang.Object
  extended by org.apache.camel.support.ServiceSupport
      extended by org.apache.camel.bam.rules.TemporalRule
All Implemented Interfaces:
org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.StatefulService, org.apache.camel.SuspendableService

public class TemporalRule
extends org.apache.camel.support.ServiceSupport

A temporal rule for use within BAM

Version:

Field Summary
 
Fields inherited from class org.apache.camel.support.ServiceSupport
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
 
Constructor Summary
TemporalRule(TimeExpression first, TimeExpression second)
           
 
Method Summary
protected  Date add(Date date, long millis)
          Returns the date in the future adding the given number of millis
protected  org.apache.camel.Exchange createExchange()
           
protected  void doStart()
           
protected  void doStop()
           
 org.apache.camel.model.OutputDefinition<?> errorIfOver(long millis)
           
 org.apache.camel.model.OutputDefinition<?> errorIfOver(org.apache.camel.util.Time builder)
           
 TemporalRule expectWithin(long millis)
           
 TemporalRule expectWithin(org.apache.camel.util.Time builder)
           
 TimeExpression getFirst()
           
 org.apache.camel.Processor getOverdueAction()
           
 TimeExpression getSecond()
           
 void processExchange(org.apache.camel.Exchange exchange, ProcessInstance instance)
           
 void processExpired(ActivityState activityState)
           
 
Methods inherited from class org.apache.camel.support.ServiceSupport
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, resume, shutdown, start, stop, suspend
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemporalRule

public TemporalRule(TimeExpression first,
                    TimeExpression second)
Method Detail

expectWithin

public TemporalRule expectWithin(org.apache.camel.util.Time builder)

expectWithin

public TemporalRule expectWithin(long millis)

errorIfOver

public org.apache.camel.model.OutputDefinition<?> errorIfOver(org.apache.camel.util.Time builder)

errorIfOver

public org.apache.camel.model.OutputDefinition<?> errorIfOver(long millis)

getFirst

public TimeExpression getFirst()

getSecond

public TimeExpression getSecond()

getOverdueAction

public org.apache.camel.Processor getOverdueAction()
                                            throws Exception
Throws:
Exception

processExchange

public void processExchange(org.apache.camel.Exchange exchange,
                            ProcessInstance instance)

processExpired

public void processExpired(ActivityState activityState)
                    throws Exception
Throws:
Exception

createExchange

protected org.apache.camel.Exchange createExchange()

add

protected Date add(Date date,
                   long millis)
Returns the date in the future adding the given number of millis

Returns:
the date in the future

doStart

protected void doStart()
                throws Exception
Specified by:
doStart in class org.apache.camel.support.ServiceSupport
Throws:
Exception

doStop

protected void doStop()
               throws Exception
Specified by:
doStop in class org.apache.camel.support.ServiceSupport
Throws:
Exception


Apache CAMEL