org.ow2.jonas.ejb2.internal.delegate
Class JTimerHandleDelegate

java.lang.Object
  extended by org.ow2.jonas.ejb2.internal.delegate.JTimerHandleDelegate
All Implemented Interfaces:
TimerHandleDelegate, JComponentContextFactoryDelegate

public class JTimerHandleDelegate
extends Object
implements TimerHandleDelegate, JComponentContextFactoryDelegate

Implementation for TimerHandleDelegate Must be added to JComponentContextFactory by addDelegate().

Author:
durieuxp

Constructor Summary
JTimerHandleDelegate()
           
 
Method Summary
 Timer getTimer(JTimerHandleInfo info)
          Retrieve the Timer in the EJBService.
 void modify(Context componentContext)
          Add the TimerHandleDelegate into the ENC Context.
 Timer restartTimer(JTimerHandleInfo info)
          Retrieve the Timer in the EJBService and restart it.
 void setEJBService(EJBService ejbserv)
           
 void undo(Context componentContext)
          Remove the TimerHandleDelegate from the ENC Context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JTimerHandleDelegate

public JTimerHandleDelegate()
Method Detail

setEJBService

public void setEJBService(EJBService ejbserv)
Parameters:
ejbserv - the EJBService to use.

getTimer

public Timer getTimer(JTimerHandleInfo info)
Retrieve the Timer in the EJBService.

Specified by:
getTimer in interface TimerHandleDelegate
Parameters:
info - Timer informations
Returns:
the Timer
See Also:
TimerHandleDelegate.getTimer(org.ow2.jonas.ejb2.JTimerHandleInfo)

restartTimer

public Timer restartTimer(JTimerHandleInfo info)
Retrieve the Timer in the EJBService and restart it.

Specified by:
restartTimer in interface TimerHandleDelegate
Parameters:
info - Timer informations
Returns:
the Timer
See Also:
TimerHandleDelegate.restartTimer(org.ow2.jonas.ejb2.JTimerHandleInfo)

modify

public void modify(Context componentContext)
            throws NamingException
Add the TimerHandleDelegate into the ENC Context.

Specified by:
modify in interface JComponentContextFactoryDelegate
Parameters:
componentContext - the ENC Context.
Throws:
NamingException - if unable to bind java:comp/TimerHandleDelegate
See Also:
JComponentContextFactoryDelegate.modify(javax.naming.Context)

undo

public void undo(Context componentContext)
          throws NamingException
Remove the TimerHandleDelegate from the ENC Context.

Specified by:
undo in interface JComponentContextFactoryDelegate
Parameters:
componentContext - the ENC Context.
Throws:
NamingException - if unable to unbind java:comp/TimerHandleDelegate
See Also:
JComponentContextFactoryDelegate.undo(javax.naming.Context)


Copyright © 2010 OW2 Consortium. All Rights Reserved.