org.objectweb.jonas_ejb.container.JTimer Class Reference

Collaboration diagram for org.objectweb.jonas_ejb.container.JTimer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 JTimer (JTimerService timerservice, long initial, long period, Serializable info)
long getStartTime ()
long getInitial ()
long getPeriod ()
JTimerService getTimerService ()
void startTimer ()
void stopTimer ()
boolean equals (Object obj)
int hashCode ()
void timeoutExpired (Object arg)
void cancel () throws IllegalStateException, NoSuchObjectLocalException, EJBException
long getTimeRemaining () throws IllegalStateException, NoSuchObjectLocalException, EJBException
Date getNextTimeout () throws IllegalStateException, NoSuchObjectLocalException, EJBException
Serializable getInfo () throws IllegalStateException, NoSuchObjectLocalException, EJBException
TimerHandle getHandle () throws IllegalStateException, NoSuchObjectLocalException, EJBException
void afterCompletion (int status)

Detailed Description

JOnAS Implementation of the Timer interface (from EJB 2.1) This is a basic implementation based on jonas_timer. A later (and better ?) implementation could be based on Quartz.
Author:
Philippe Durieux

Definition at line 54 of file JTimer.java.


Constructor & Destructor Documentation

org.objectweb.jonas_ejb.container.JTimer.JTimer JTimerService  timerservice,
long  initial,
long  period,
Serializable  info
 

constructor

Definition at line 129 of file JTimer.java.


Member Function Documentation

void org.objectweb.jonas_ejb.container.JTimer.afterCompletion int  status  ) 
 

The afterCompletion method is called by the transaction manager after the transaction is committed or rolled back. This method executes without a transaction context.

Parameters:
status The status of the transaction completion.

Definition at line 427 of file JTimer.java.

void org.objectweb.jonas_ejb.container.JTimer.cancel  )  throws IllegalStateException, NoSuchObjectLocalException, EJBException
 

Cause the timer and all its associated expiration notifications to be cancelled.

Exceptions:
IllegalStateException the instance is in a state that does not allow access to this method.
NoSuchObjectLocalException If invoked on a timer that has expired or has been cancelled.
EJBException If this method could not complete due to a system-level failure.

Definition at line 299 of file JTimer.java.

References org.objectweb.jonas_ejb.container.JTimerService.getTransactionManager().

Here is the call graph for this function:

boolean org.objectweb.jonas_ejb.container.JTimer.equals Object  obj  ) 
 

Indicates whether some other object is "equal to" this one.

Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.

Definition at line 222 of file JTimer.java.

References org.objectweb.jonas_ejb.container.JTimer.getInitial(), org.objectweb.jonas_ejb.container.JTimer.getPeriod(), and org.objectweb.jonas_ejb.container.JTimer.getTimerService().

Referenced by org.objectweb.jonas_ejb.container.JTimerService.getTimer().

Here is the call graph for this function:

TimerHandle org.objectweb.jonas_ejb.container.JTimer.getHandle  )  throws IllegalStateException, NoSuchObjectLocalException, EJBException
 

Get a serializable handle to the timer. This handle can be used at a later time to re-obtain the timer reference.

Returns:
a serializable handle to the timer.
Exceptions:
IllegalStateException the instance is in a state that does not allow access to this method.
NoSuchObjectLocalException If invoked on a timer that has expired or has been cancelled.
EJBException If this method could not complete due to a system-level failure.

Definition at line 404 of file JTimer.java.

References org.objectweb.jonas_ejb.container.JTimerService.getContainer(), org.objectweb.jonas_ejb.container.JTimerService.getEjbName(), and org.objectweb.jonas_ejb.container.JTimerService.getPK().

Here is the call graph for this function:

Serializable org.objectweb.jonas_ejb.container.JTimer.getInfo  )  throws IllegalStateException, NoSuchObjectLocalException, EJBException
 

Get the information associated with the timer at the time of creation.

Returns:
The Serializable object that was passed in at timer creation, or null if the info argument passed in at timer creation was null.
Exceptions:
IllegalStateException the instance is in a state that does not allow access to this method.
NoSuchObjectLocalException If invoked on a timer that has expired or has been cancelled.
EJBException If this method could not complete due to a system-level failure.

Definition at line 384 of file JTimer.java.

long org.objectweb.jonas_ejb.container.JTimer.getInitial  ) 
 

Returns:
the initial duration in millisec.

Definition at line 149 of file JTimer.java.

Referenced by org.objectweb.jonas_ejb.container.JTimer.equals().

Date org.objectweb.jonas_ejb.container.JTimer.getNextTimeout  )  throws IllegalStateException, NoSuchObjectLocalException, EJBException
 

Get the point in time at which the next timer expiration is scheduled to occur.

Returns:
the point in time at which the next timer expiration is scheduled to occur.
Exceptions:
IllegalStateException the instance is in a state that does not allow access to this method.
NoSuchObjectLocalException If invoked on a timer that has expired or has been cancelled.
EJBException If this method could not complete due to a system-level failure.

Definition at line 364 of file JTimer.java.

long org.objectweb.jonas_ejb.container.JTimer.getPeriod  ) 
 

Returns:
the period in millisec. (periodic timers only)

Definition at line 156 of file JTimer.java.

Referenced by org.objectweb.jonas_ejb.container.JTimer.equals(), and org.objectweb.jonas_ejb.container.JTimer.hashCode().

long org.objectweb.jonas_ejb.container.JTimer.getStartTime  ) 
 

Returns:
the start time in millisec.

Definition at line 142 of file JTimer.java.

long org.objectweb.jonas_ejb.container.JTimer.getTimeRemaining  )  throws IllegalStateException, NoSuchObjectLocalException, EJBException
 

Get the number of milliseconds that will elapse before the next scheduled timer expiration.

Returns:
the number of milliseconds that will elapse before the next scheduled timer expiration.
Exceptions:
IllegalStateException the instance is in a state that does not allow access to this method.
NoSuchObjectLocalException If invoked on a timer that has expired or has been cancelled.
EJBException If this method could not complete due to a system-level failure.

Definition at line 343 of file JTimer.java.

JTimerService org.objectweb.jonas_ejb.container.JTimer.getTimerService  ) 
 

Returns:
the Jonas Timer Service that manages this Timer

Definition at line 163 of file JTimer.java.

Referenced by org.objectweb.jonas_ejb.container.JTimer.equals().

int org.objectweb.jonas_ejb.container.JTimer.hashCode  ) 
 

Returns a hash code value for the object.

Returns:
a hash code value for this object.

Definition at line 249 of file JTimer.java.

References org.objectweb.jonas_ejb.container.JTimer.getPeriod().

Here is the call graph for this function:

void org.objectweb.jonas_ejb.container.JTimer.startTimer  ) 
 

start the Timer

Definition at line 170 of file JTimer.java.

References org.objectweb.jonas_timer.TimerManager.addTimerMs(), and org.objectweb.jonas_ejb.container.JTimerService.getTransactionManager().

Referenced by org.objectweb.jonas_ejb.container.JTimerService.createTimer().

Here is the call graph for this function:

void org.objectweb.jonas_ejb.container.JTimer.stopTimer  ) 
 

Stop a timer. Used internally.

Definition at line 199 of file JTimer.java.

Referenced by org.objectweb.jonas_ejb.container.JTimerService.cancelAllTimers().

void org.objectweb.jonas_ejb.container.JTimer.timeoutExpired Object  arg  ) 
 

The timer has just expired.

Definition at line 260 of file JTimer.java.

References org.objectweb.jonas_timer.TimerManager.addTimerMs(), org.objectweb.jonas_ejb.container.JTimerService.notify(), and org.objectweb.jonas_ejb.container.JTimerService.remove().

Here is the call graph for this function:


The documentation for this class was generated from the following file:
Generated on Tue Feb 15 15:10:52 2005 for JOnAS by  doxygen 1.3.9.1