commonj.timers
Interface TimerListener

All Known Subinterfaces:
CancelTimerListener, StopTimerListener

public interface TimerListener

Objects that implement this interface and are supplied to one of the TimerManager#schedule methods can receieve timer notifications. When the timer expires, the timerExpired(commonj.timers.Timer) method is called and the Timer object that has expired is provided. This Timer object is a reference and can be used by more than one expiration of the timer.

The J2EE context of the caller of the schedule methods is remembered and used for all asynchronous invocations of these methods.

See Also:
Timer, TimerManager

Method Summary
 void timerExpired(Timer timer)
          This method is called when a timer expires.
 

Method Detail

timerExpired

public void timerExpired(Timer timer)
This method is called when a timer expires.

The TimerListener will be called with no transaction on the thread and if a global transaction is required then a transaction can be created using UserTransaction in an identical manner as servlets or bean-managed transaction Enterprise Java Beans.

Parameters:
timer - the Timer object that expired.


Copyright BEA Systems, Inc. and International Business Machines Corp 2003. All rights reserved.