org.jboss.ejb.txtimer
Class EJBTimerServiceLocator.MBeanDelegate

java.lang.Object
  extended by org.jboss.ejb.txtimer.EJBTimerServiceLocator.MBeanDelegate
All Implemented Interfaces:
EJBTimerService
Enclosing class:
EJBTimerServiceLocator

public static class EJBTimerServiceLocator.MBeanDelegate
extends Object
implements EJBTimerService

Delegates method calls to the EJBTimerService to the MBean server


Field Summary
 
Fields inherited from interface org.jboss.ejb.txtimer.EJBTimerService
OBJECT_NAME
 
Constructor Summary
EJBTimerServiceLocator.MBeanDelegate(javax.management.MBeanServer server)
           
 
Method Summary
 javax.ejb.TimerService createTimerService(javax.management.ObjectName containerId, Object instancePk, Container container)
          Create a TimerService for a given containerId/pKey (TimedObjectId) that lives in a JBoss Container.
 javax.ejb.TimerService createTimerService(javax.management.ObjectName containerId, Object instancePk, TimedObjectInvoker invoker)
          Create a TimerService for a given containerId/pKey (TimedObjectId) that is invoked through the given invoker.
 javax.ejb.TimerService getTimerService(javax.management.ObjectName containerId, Object instancePk)
          Get the TimerService for a given containerId/pKey (TimedObjectId).
 void removeTimerService(javax.management.ObjectName containerId, boolean keepState)
          Remove the TimerService for a given containerId.
 void removeTimerService(javax.management.ObjectName containerId, Object instancePk)
          Remove the TimerService for a given containerId/pKey (TimedObjectId), along with any persisted timer information.
 void restoreTimers(javax.management.ObjectName containerId, ClassLoader loader)
          Restore the persisted timers for a given ejb container
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EJBTimerServiceLocator.MBeanDelegate

public EJBTimerServiceLocator.MBeanDelegate(javax.management.MBeanServer server)
Method Detail

createTimerService

public javax.ejb.TimerService createTimerService(javax.management.ObjectName containerId,
                                                 Object instancePk,
                                                 Container container)
                                          throws IllegalStateException
Description copied from interface: EJBTimerService
Create a TimerService for a given containerId/pKey (TimedObjectId) that lives in a JBoss Container. The TimedObjectInvoker is constructed from the invokerClassName.

Specified by:
createTimerService in interface EJBTimerService
Parameters:
containerId - The string identifier for a class of TimedObjects
instancePk - The primary key for an instance of a TimedObject, may be null
container - The Container that is associated with the TimerService
Returns:
the TimerService
Throws:
IllegalStateException

createTimerService

public javax.ejb.TimerService createTimerService(javax.management.ObjectName containerId,
                                                 Object instancePk,
                                                 TimedObjectInvoker invoker)
                                          throws IllegalStateException
Description copied from interface: EJBTimerService
Create a TimerService for a given containerId/pKey (TimedObjectId) that is invoked through the given invoker.

Specified by:
createTimerService in interface EJBTimerService
Parameters:
containerId - The string identifier for a class of TimedObjects
instancePk - The primary key for an instance of a TimedObject, may be null
invoker - The TimedObjectInvoker
Returns:
the TimerService
Throws:
IllegalStateException

getTimerService

public javax.ejb.TimerService getTimerService(javax.management.ObjectName containerId,
                                              Object instancePk)
                                       throws IllegalStateException
Description copied from interface: EJBTimerService
Get the TimerService for a given containerId/pKey (TimedObjectId).

Specified by:
getTimerService in interface EJBTimerService
Parameters:
containerId - The string identifier for a class of TimedObjects
instancePk - The primary key for an instance of a TimedObject, may be null
Returns:
The TimerService, or null if it does not exist
Throws:
IllegalStateException

removeTimerService

public void removeTimerService(javax.management.ObjectName containerId,
                               Object instancePk)
                        throws IllegalStateException
Description copied from interface: EJBTimerService
Remove the TimerService for a given containerId/pKey (TimedObjectId), along with any persisted timer information. This should be used for removing the TimerService and Timers associated with a particular entity bean, when it gets removed.

Specified by:
removeTimerService in interface EJBTimerService
Parameters:
containerId - The string identifier for a class of TimedObjects
instancePk - The primary key for an instance of a TimedObject, may be null
Throws:
IllegalStateException

removeTimerService

public void removeTimerService(javax.management.ObjectName containerId,
                               boolean keepState)
                        throws IllegalStateException
Description copied from interface: EJBTimerService
Remove the TimerService for a given containerId. This should be used to remove the timer service and timers for any type of container (session, entity, message) at the time of undeployment.

Specified by:
removeTimerService in interface EJBTimerService
Parameters:
containerId - The string identifier for a class of TimedObjects
keepState - Flag indicating whether timer persistent state should be kept or removed
Throws:
IllegalStateException

restoreTimers

public void restoreTimers(javax.management.ObjectName containerId,
                          ClassLoader loader)
                   throws IllegalStateException
Description copied from interface: EJBTimerService
Restore the persisted timers for a given ejb container

Specified by:
restoreTimers in interface EJBTimerService
Parameters:
containerId - The ejb container id
loader - The classloader to use for loading the timers
Throws:
IllegalStateException


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.