org.jfox.ejb3.timer
Class EJBTimerTask

java.lang.Object
  extended by org.jfox.ejb3.timer.EJBTimerTask
All Implemented Interfaces:
java.io.Serializable, java.lang.Runnable, javax.ejb.Timer, javax.ejb.TimerHandle

public class EJBTimerTask
extends java.lang.Object
implements javax.ejb.Timer, javax.ejb.TimerHandle, java.lang.Runnable

See Also:
Serialized Form

Constructor Summary
EJBTimerTask(SimpleEJB3Container.ContainerTimerService timerService, java.io.Serializable info)
           
 
Method Summary
 void addTimeoutMethod(java.lang.reflect.Method[] timeoutMethods)
           
 void cancel()
          need remove from EJBTimerService's timers
 EJBObjectId getEJBObjectId()
           
 javax.ejb.TimerHandle getHandle()
           
 java.io.Serializable getInfo()
           
 java.util.Date getNextTimeout()
           
 SecurityContext getSecurityContext()
           
 java.lang.reflect.Method[] getTimeoutMethods()
           
 javax.ejb.Timer getTimer()
           
 long getTimeRemaining()
           
static void main(java.lang.String[] args)
           
 void run()
           
 void setEJBObjectId(EJBObjectId ejbObjectId)
           
 void setFuture(java.util.concurrent.ScheduledFuture future)
           
 void setSecurityContext(SecurityContext securityContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EJBTimerTask

public EJBTimerTask(SimpleEJB3Container.ContainerTimerService timerService,
                    java.io.Serializable info)
Method Detail

getEJBObjectId

public EJBObjectId getEJBObjectId()

setEJBObjectId

public void setEJBObjectId(EJBObjectId ejbObjectId)

getSecurityContext

public SecurityContext getSecurityContext()

setSecurityContext

public void setSecurityContext(SecurityContext securityContext)

setFuture

public void setFuture(java.util.concurrent.ScheduledFuture future)

getTimeRemaining

public long getTimeRemaining()
                      throws java.lang.IllegalStateException,
                             javax.ejb.NoSuchObjectLocalException,
                             javax.ejb.EJBException
Specified by:
getTimeRemaining in interface javax.ejb.Timer
Throws:
java.lang.IllegalStateException
javax.ejb.NoSuchObjectLocalException
javax.ejb.EJBException

getNextTimeout

public java.util.Date getNextTimeout()
                              throws java.lang.IllegalStateException,
                                     javax.ejb.NoSuchObjectLocalException,
                                     javax.ejb.EJBException
Specified by:
getNextTimeout in interface javax.ejb.Timer
Throws:
java.lang.IllegalStateException
javax.ejb.NoSuchObjectLocalException
javax.ejb.EJBException

getInfo

public java.io.Serializable getInfo()
                             throws java.lang.IllegalStateException,
                                    javax.ejb.NoSuchObjectLocalException,
                                    javax.ejb.EJBException
Specified by:
getInfo in interface javax.ejb.Timer
Throws:
java.lang.IllegalStateException
javax.ejb.NoSuchObjectLocalException
javax.ejb.EJBException

getHandle

public javax.ejb.TimerHandle getHandle()
                                throws java.lang.IllegalStateException,
                                       javax.ejb.NoSuchObjectLocalException,
                                       javax.ejb.EJBException
Specified by:
getHandle in interface javax.ejb.Timer
Throws:
java.lang.IllegalStateException
javax.ejb.NoSuchObjectLocalException
javax.ejb.EJBException

getTimer

public javax.ejb.Timer getTimer()
                         throws java.lang.IllegalStateException,
                                javax.ejb.NoSuchObjectLocalException,
                                javax.ejb.EJBException
Specified by:
getTimer in interface javax.ejb.TimerHandle
Throws:
java.lang.IllegalStateException
javax.ejb.NoSuchObjectLocalException
javax.ejb.EJBException

cancel

public void cancel()
need remove from EJBTimerService's timers

Specified by:
cancel in interface javax.ejb.Timer

addTimeoutMethod

public void addTimeoutMethod(java.lang.reflect.Method[] timeoutMethods)

getTimeoutMethods

public java.lang.reflect.Method[] getTimeoutMethods()

run

public void run()
Specified by:
run in interface java.lang.Runnable

main

public static void main(java.lang.String[] args)