All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.jaw.impl.agent.services.alarm.AlarmClock

java.lang.Object
   |
   +----com.sun.jaw.impl.agent.services.alarm.AlarmClock

public class AlarmClock
extends Object
implements Runnable, Serializable, ActivatableIf
This class provides a simple implementation of an alarm-clock service.

The aim of this service is to set up an alarm which wakes up all the listeners registered to receive events of type AlarmClock.


Constructor Index

 o AlarmClock()
Default constructor.

Method Index

 o addAlarmClockListener(AlarmClockListener)
Allows to register a listener for receiving alarm-clock events.
 o deleteCmf()
Delete the alarm-clock.
 o getTimeout()
Deprecated.
 o getTimeoutAsLong()
Returns the timeout value (in milliseconds).
 o initCmf(Framework, ObjectName, boolean, ModificationList)
Initialize the alarm-clock.
 o isActive()
Test if the alarm-clock is active.
 o performStart()
Starts the alarm-clock count.
 o performStop()
Stops the alarm-clock count.
 o removeAlarmClockListener(AlarmClockListener)
Enables a listener for alarm-clock events to be removed.
 o run()
This method is called by the thread created when the alarm-clock is started.
 o setTimeout(Integer)
Deprecated.
 o setTimeoutAsLong(Long)
Sets the timeout value (in milliseconds).

Constructors

 o AlarmClock
 public AlarmClock()
Default constructor.

Methods

 o initCmf
 public void initCmf(Framework cmf,
                     ObjectName name,
                     boolean db,
                     ModificationList list) throws InstanceAlreadyExistException
Initialize the alarm-clock. The method will declare the object to the Core Management Framework.
For internal use only.

Parameters:
agent - The core management framework to register the service with.
name - Object name.
db - Indicates if persistent storage is required.
list - The modification list to use for setting up parameters.
Throws: InstanceAlreadyExistException
The m-bean is already registered in the repository.
 o deleteCmf
 public void deleteCmf()
Delete the alarm-clock.

 o performStart
 public synchronized void performStart()
Starts the alarm-clock count.

 o performStop
 public synchronized void performStop()
Stops the alarm-clock count.

 o isActive
 public boolean isActive()
Test if the alarm-clock is active.

 o run
 public void run()
This method is called by the thread created when the alarm-clock is started.

 o addAlarmClockListener
 public void addAlarmClockListener(AlarmClockListener listener)
Allows to register a listener for receiving alarm-clock events.

 o removeAlarmClockListener
 public void removeAlarmClockListener(AlarmClockListener listener)
Enables a listener for alarm-clock events to be removed.

 o getTimeoutAsLong
 public Long getTimeoutAsLong()
Returns the timeout value (in milliseconds).

 o getTimeout
 public Integer getTimeout()
Note: getTimeout() is deprecated.

 o setTimeoutAsLong
 public void setTimeoutAsLong(Long time)
Sets the timeout value (in milliseconds).

 o setTimeout
 public void setTimeout(Integer time)
Note: setTimeout() is deprecated.


All Packages  Class Hierarchy  This Package  Previous  Next  Index