org.ow2.bonita.pvm.session
Interface TimerSession

All Known Implementing Classes:
EnterpriseTimerSession, JobExecutorTimerSession

public interface TimerSession

Author:
Tom Baeyens, Pascal Verdage

Method Summary
 void cancel(Timer timer)
          Cancels a timer.
 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.


Copyright © 2009 OW2 Consortium. All Rights Reserved.