org.jboss.ejb.txtimer
Interface EJBTimerService

All Known Subinterfaces:
EJBTimerServiceImplMBean
All Known Implementing Classes:
EJBTimerServiceImpl, EJBTimerServiceLocator.MBeanDelegate

public interface EJBTimerService

A service that implements this interface provides a Tx aware EJBTimerService.

Since:
07-Apr-2004
Version:
$Revision: 57209 $
Author:
Thomas.Diesler@jboss.org, Dimitris.Andreadis@jboss.org

Field Summary
static javax.management.ObjectName OBJECT_NAME
          The default object name
 
Method Summary
 javax.ejb.TimerService createTimerService(javax.management.ObjectName containerId, Object pKey, 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 pKey, 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 pKey)
          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 pKey)
          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
 

Field Detail

OBJECT_NAME

static final javax.management.ObjectName OBJECT_NAME
The default object name

Method Detail

createTimerService

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

Parameters:
containerId - The string identifier for a class of TimedObjects
pKey - 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

javax.ejb.TimerService createTimerService(javax.management.ObjectName containerId,
                                          Object pKey,
                                          TimedObjectInvoker invoker)
                                          throws IllegalStateException
Create a TimerService for a given containerId/pKey (TimedObjectId) that is invoked through the given invoker.

Parameters:
containerId - The string identifier for a class of TimedObjects
pKey - The primary key for an instance of a TimedObject, may be null
invoker - The TimedObjectInvoker
Returns:
the TimerService
Throws:
IllegalStateException

getTimerService

javax.ejb.TimerService getTimerService(javax.management.ObjectName containerId,
                                       Object pKey)
                                       throws IllegalStateException
Get the TimerService for a given containerId/pKey (TimedObjectId).

Parameters:
containerId - The string identifier for a class of TimedObjects
pKey - 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

void removeTimerService(javax.management.ObjectName containerId,
                        Object pKey)
                        throws IllegalStateException
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.

Parameters:
containerId - The string identifier for a class of TimedObjects
pKey - The primary key for an instance of a TimedObject, may be null
Throws:
IllegalStateException

removeTimerService

void removeTimerService(javax.management.ObjectName containerId,
                        boolean keepState)
                        throws IllegalStateException
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.

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

void restoreTimers(javax.management.ObjectName containerId,
                   ClassLoader loader)
                   throws IllegalStateException
Restore the persisted timers for a given ejb container

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.