org.ow2.easybeans.component.itf
Interface TimerComponent

All Superinterfaces:
EZBComponent

public interface TimerComponent
extends EZBComponent

Interface for the component that provides the EJB timer service.

Author:
Florent Benoit

Method Summary
 EZBTimerService getTimerService(Factory<?,?> factory)
          Gets an EJB timer service through this component.
 void schedule(String id, long interval, TimerCallback callback, Map<String,Object> callbackProperties)
          Schedule a recurring call to a TimerCallback starting immediately.
 void unschedule(String id)
          Unschedule a callback timer for a given id
 
Methods inherited from interface org.ow2.easybeans.component.api.EZBComponent
init, start, stop
 

Method Detail

getTimerService

EZBTimerService getTimerService(Factory<?,?> factory)
Gets an EJB timer service through this component.

Parameters:
factory - an EasyBeans factory providing timeout notification.
Returns:
an EJB timer service

schedule

void schedule(String id,
              long interval,
              TimerCallback callback,
              Map<String,Object> callbackProperties)
              throws EZBComponentException
Schedule a recurring call to a TimerCallback starting immediately.

Parameters:
id - if there is already a Callback scheduled with the same id then an exception is thrown
interval - Recurrence interval in milliseconds
callback - The TimerCallback to notify
callbackProperties - Properties to be send to the TimerCallback.execute(java.util.Map) method
Throws:
EZBComponentException

unschedule

void unschedule(String id)
                throws EZBComponentException
Unschedule a callback timer for a given id

Parameters:
id - the scheduled timer id
Throws:
EZBComponentException


Copyright © 2006-2012 OW2 Consortium. All Rights Reserved.