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.
-
AlarmClock()
- Default constructor.
-
addAlarmClockListener(AlarmClockListener)
- Allows to register a listener for receiving alarm-clock events.
-
deleteCmf()
- Delete the alarm-clock.
-
getTimeout()
-
Deprecated.
-
getTimeoutAsLong()
- Returns the timeout value (in milliseconds).
-
initCmf(Framework, ObjectName, boolean, ModificationList)
- Initialize the alarm-clock.
-
isActive()
- Test if the alarm-clock is active.
-
performStart()
- Starts the alarm-clock count.
-
performStop()
- Stops the alarm-clock count.
-
removeAlarmClockListener(AlarmClockListener)
- Enables a listener for alarm-clock events to be removed.
-
run()
- This method is called by the thread created
when the alarm-clock is started.
-
setTimeout(Integer)
-
Deprecated.
-
setTimeoutAsLong(Long)
- Sets the timeout value (in milliseconds).
AlarmClock
public AlarmClock()
- Default constructor.
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.
deleteCmf
public void deleteCmf()
- Delete the alarm-clock.
performStart
public synchronized void performStart()
- Starts the alarm-clock count.
performStop
public synchronized void performStop()
- Stops the alarm-clock count.
isActive
public boolean isActive()
- Test if the alarm-clock is active.
run
public void run()
- This method is called by the thread created
when the alarm-clock is started.
addAlarmClockListener
public void addAlarmClockListener(AlarmClockListener listener)
- Allows to register a listener for receiving alarm-clock events.
removeAlarmClockListener
public void removeAlarmClockListener(AlarmClockListener listener)
- Enables a listener for alarm-clock events to be removed.
getTimeoutAsLong
public Long getTimeoutAsLong()
- Returns the timeout value (in milliseconds).
getTimeout
public Integer getTimeout()
- Note: getTimeout() is deprecated.
setTimeoutAsLong
public void setTimeoutAsLong(Long time)
- Sets the timeout value (in milliseconds).
setTimeout
public void setTimeout(Integer time)
- Note: setTimeout() is deprecated.
All Packages Class Hierarchy This Package Previous Next Index