javax.ejb

Interface Timer

public interface Timer

The timer interface

Method Summary

void
cancel()
TimerHandle
getHandle()
Serializable
getInfo()
Date
getNextTimeout()
long
getTimeRemaining()

Method Details

cancel

public void cancel()
            throws NoSuchObjectLocalException,
                   EJBException
Usages and Demos :

View More Examples of cancel()
   1:         for (Object obj : timerService.getTimers()) {
   2:             javax.ejb.Timer timer = (javax.ejb.Timer)obj;
   3:         ...
   4:             String scheduled = (String)timer.getInfo();
   5:             if (scheduled.equals(item)) {
   6:         ...
   7:                 timer.cancel();
   8:             }

View Full Code Here

getHandle

public TimerHandle getHandle()
            throws NoSuchObjectLocalException,
                   EJBException
Usages and Demos :

View More Examples of getHandle()
   1: package org.jfox.examples.ejb.timer;
   2: 
   3:         ...
   4: import javax.ejb.TimedObject;
   5: import javax.ejb.Timer;
   6: import javax.ejb.TimerHandle;
   7:         ...
   8: 
   9:     public void ejbTimeout(Timer timer) {
  10:         System.out.println("ejbTimeout, Timer is: " + timer);
  11:         ...
  12: 
  13:         TimerHandle handle = timer.getHandle();

View Full Code Here

getInfo

public Serializable getInfo()
            throws NoSuchObjectLocalException,
                   EJBException
Usages and Demos :

View More Examples of getInfo()
   1:         for (Object obj : timerService.getTimers()) {
   2:             javax.ejb.Timer timer = (javax.ejb.Timer)obj;
   3:         ...
   4:             String scheduled = (String)timer.getInfo();
   5:             if (scheduled.equals(item)) {
   6:         ...
   7:                 timer.cancel();
   8:             }
   9:         ...
  10:        System.out.println("TIMEOUT METHOD CALLED");
  11:        String scheduled = (String)timer.getInfo();

View Full Code Here

getNextTimeout

public Date getNextTimeout()
            throws NoSuchObjectLocalException,
                   EJBException

getTimeRemaining

public long getTimeRemaining()
            throws NoSuchObjectLocalException,
                   EJBException