org.ow2.easybeans.examples.timerservice
Class TimedObjectBean

java.lang.Object
  extended by org.ow2.easybeans.examples.timerservice.TimedObjectBean
All Implemented Interfaces:
javax.ejb.TimedObject, TimedLocal

public class TimedObjectBean
extends Object
implements javax.ejb.TimedObject, TimedLocal

Bean that implements the TimedObject interface.
The timeout method will be ejbTimeout().

Author:
Florent Benoit

Constructor Summary
TimedObjectBean()
           
 
Method Summary
 void ejbTimeout(javax.ejb.Timer timer)
          Invoked by the EJB container upon timer expiration.
 void setTimerService(javax.ejb.TimerService timerService)
          Use a setter method to inject the timer service.
 void startTimer()
          Local method that is used by the other bean in order to start a timer on this bean.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimedObjectBean

public TimedObjectBean()
Method Detail

startTimer

public void startTimer()
Local method that is used by the other bean in order to start a timer on this bean.

Specified by:
startTimer in interface TimedLocal

ejbTimeout

public void ejbTimeout(javax.ejb.Timer timer)
Invoked by the EJB container upon timer expiration.

Specified by:
ejbTimeout in interface javax.ejb.TimedObject
Parameters:
timer - timer whose expiration caused this notification.

setTimerService

public void setTimerService(javax.ejb.TimerService timerService)
Use a setter method to inject the timer service.

Parameters:
timerService - the instance of the timer service.


Copyright © 2006-2010 OW2 Consortium. All Rights Reserved.