org.jbpm.pvm.internal.session
Interface TimerSession

All Known Implementing Classes:
JobExecutorTimerSession

public interface TimerSession

Author:
Tom Baeyens, Pascal Verdage

Method Summary
 void cancel(Timer timer)
          Cancels a timer.
 java.util.List<Timer> findTimersByExecution(Execution execution)
          retrieve all the outstanding timers associated for the given execution
 void schedule(Timer timer)
          Schedule the execution of a timer.
 

Method Detail

schedule

void schedule(Timer timer)
Schedule the execution of a timer.

Parameters:
timerImpl - the timer to be executed.
Throws:
java.lang.IllegalArgumentException - if the timer is null or if its activity is null or if its duedate is null or if its duedate is negative or if its duedate is past or if its duedate is equals to Long.MAX_VALUE

cancel

void cancel(Timer timer)
Cancels a timer.
If a transaction is in progress, the cancellation will be effective at the end of the transaction. If the timer has been created in the same transaction or if there is no transaction, the cancellation is immediately effective.
If the timer is executing when the cancellation becomes effective, the execution in progress will not be stopped.

Parameters:
timerImpl - the timer to be cancelled.

findTimersByExecution

java.util.List<Timer> findTimersByExecution(Execution execution)
retrieve all the outstanding timers associated for the given execution



Copyright © 2010 JBoss Community. All Rights Reserved.