Save This Page
Home » jboss-5.0.0.CR1-src » org » jboss » ejb » txtimer » [javadoc | source]
org.jboss.ejb.txtimer
public class: TimerImpl [javadoc | source]
java.lang.Object
   org.jboss.ejb.txtimer.TimerImpl

All Implemented Interfaces:
    javax.transaction.Synchronization, javax.ejb.Timer

An implementation of an EJB Timer. Internally it uses a java.util.Timer and maintains its state in a Tx manner.
Constructor:
 TimerImpl(TimerServiceImpl timerService,
    String timerId,
    TimedObjectId timedObjectId,
    TimedObjectInvoker timedObjectInvoker,
    Serializable info) 
    Schedules the txtimer for execution at the specified time with a specified periode.
Method from org.jboss.ejb.txtimer.TimerImpl Summary:
afterCompletion,   beforeCompletion,   cancel,   equals,   getFirstTime,   getHandle,   getInfo,   getInfoInternal,   getNextExpire,   getNextTimeout,   getPeriode,   getTimeRemaining,   getTimedObjectId,   getTimerId,   hashCode,   isActive,   isCanceled,   isExpired,   isInRetry,   killTimer,   startTimer,   stopTimer,   toString
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jboss.ejb.txtimer.TimerImpl Detail:
 public  void afterCompletion(int status) 
    This method is invoked after the transaction has committed or rolled back.
 public  void beforeCompletion() 
    This method is invoked before the start of the commit or rollback process. The method invocation is done in the context of the transaction that is about to be committed or rolled back.
 public  void cancel() throws NoSuchObjectLocalException, EJBException, IllegalStateException 
    Cause the txtimer and all its associated expiration notifications to be cancelled.
 public boolean equals(Object obj) 
    Return true if objectId, createDate, periode are equal
 public Date getFirstTime() 
 public TimerHandle getHandle() throws NoSuchObjectLocalException, EJBException, IllegalStateException 
    Get a serializable handle to the txtimer. This handle can be used at a later time to re-obtain the txtimer reference.
 public Serializable getInfo() throws NoSuchObjectLocalException, EJBException, IllegalStateException 
    Get the information associated with the txtimer at the time of creation.
 public Serializable getInfoInternal() 
 public long getNextExpire() 
 public Date getNextTimeout() throws NoSuchObjectLocalException, EJBException, IllegalStateException 
    Get the point in time at which the next txtimer expiration is scheduled to occur.
 public long getPeriode() 
 public long getTimeRemaining() throws NoSuchObjectLocalException, EJBException, IllegalStateException 
    Get the number of milliseconds that will elapse before the next scheduled txtimer expiration.
 public TimedObjectId getTimedObjectId() 
 public String getTimerId() 
 public int hashCode() 
    Hash code based on the Timers invariant properties
 public boolean isActive() 
 public boolean isCanceled() 
 public boolean isExpired() 
 public boolean isInRetry() 
 public  void killTimer() 
    Kill the timer, and remove it from the timer service
  void startTimer(Date firstTime,
    long periode) 
 public  void stopTimer() 
    Kill the timer, do not remove from timer service
 public String toString() 
    Returns a string representation of the object.