javax.management.timer
Class Timer

java.lang.Object
  |
  +--javax.management.NotificationBroadcasterSupport
        |
        +--javax.management.timer.Timer
All Implemented Interfaces:
MBeanRegistration, NotificationBroadcaster, TimerMBean

public class Timer
extends NotificationBroadcasterSupport
implements TimerMBean, MBeanRegistration

Version:
$Revision: 1.5 $
Author:
Simone Bordet

Field Summary
static long ONE_DAY
           
static long ONE_HOUR
           
static long ONE_MINUTE
           
static long ONE_SECOND
           
static long ONE_WEEK
           
 
Constructor Summary
Timer()
           
 
Method Summary
 java.lang.Integer addNotification(java.lang.String type, java.lang.String message, java.lang.Object userData, java.util.Date date)
           
 java.lang.Integer addNotification(java.lang.String type, java.lang.String message, java.lang.Object userData, java.util.Date date, long period)
           
 java.lang.Integer addNotification(java.lang.String type, java.lang.String message, java.lang.Object userData, java.util.Date date, long period, long occurrences)
           
 java.util.Vector getAllNotificationIDs()
           
 java.util.Date getDate(java.lang.Integer id)
           
 int getNbNotifications()
           
 java.lang.Long getNbOccurences(java.lang.Integer id)
           
 java.util.Vector getNotificationIDs(java.lang.String type)
           
 java.lang.String getNotificationMessage(java.lang.Integer id)
           
 java.lang.String getNotificationType(java.lang.Integer id)
           
 java.lang.Object getNotificationUserData(java.lang.Integer id)
           
 java.lang.Long getPeriod(java.lang.Integer id)
           
 boolean getSendPastNotifications()
           
 boolean isActive()
           
 boolean isEmpty()
           
 void postDeregister()
           
 void postRegister(java.lang.Boolean registrationDone)
           
 void preDeregister()
           
 ObjectName preRegister(MBeanServer server, ObjectName name)
           
 void removeAllNotifications()
           
 void removeNotification(java.lang.Integer id)
           
 void removeNotifications(java.lang.String type)
           
 void setSendPastNotifications(boolean value)
           
 void start()
           
 void stop()
           
 
Methods inherited from class javax.management.NotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ONE_SECOND

public static final long ONE_SECOND

ONE_MINUTE

public static final long ONE_MINUTE

ONE_HOUR

public static final long ONE_HOUR

ONE_DAY

public static final long ONE_DAY

ONE_WEEK

public static final long ONE_WEEK
Constructor Detail

Timer

public Timer()
Method Detail

preRegister

public ObjectName preRegister(MBeanServer server,
                              ObjectName name)
                       throws java.lang.Exception
Specified by:
preRegister in interface MBeanRegistration

postRegister

public void postRegister(java.lang.Boolean registrationDone)
Specified by:
postRegister in interface MBeanRegistration

preDeregister

public void preDeregister()
                   throws java.lang.Exception
Specified by:
preDeregister in interface MBeanRegistration

postDeregister

public void postDeregister()
Specified by:
postDeregister in interface MBeanRegistration

start

public void start()
Specified by:
start in interface TimerMBean

stop

public void stop()
Specified by:
stop in interface TimerMBean

isActive

public boolean isActive()
Specified by:
isActive in interface TimerMBean

addNotification

public java.lang.Integer addNotification(java.lang.String type,
                                         java.lang.String message,
                                         java.lang.Object userData,
                                         java.util.Date date)
                                  throws java.lang.IllegalArgumentException
Specified by:
addNotification in interface TimerMBean

addNotification

public java.lang.Integer addNotification(java.lang.String type,
                                         java.lang.String message,
                                         java.lang.Object userData,
                                         java.util.Date date,
                                         long period)
                                  throws java.lang.IllegalArgumentException
Specified by:
addNotification in interface TimerMBean

addNotification

public java.lang.Integer addNotification(java.lang.String type,
                                         java.lang.String message,
                                         java.lang.Object userData,
                                         java.util.Date date,
                                         long period,
                                         long occurrences)
                                  throws java.lang.IllegalArgumentException
Specified by:
addNotification in interface TimerMBean

removeNotification

public void removeNotification(java.lang.Integer id)
                        throws InstanceNotFoundException
Specified by:
removeNotification in interface TimerMBean

removeNotifications

public void removeNotifications(java.lang.String type)
                         throws InstanceNotFoundException
Specified by:
removeNotifications in interface TimerMBean

removeAllNotifications

public void removeAllNotifications()
Specified by:
removeAllNotifications in interface TimerMBean

getAllNotificationIDs

public java.util.Vector getAllNotificationIDs()
Specified by:
getAllNotificationIDs in interface TimerMBean

getNotificationIDs

public java.util.Vector getNotificationIDs(java.lang.String type)
Specified by:
getNotificationIDs in interface TimerMBean

getSendPastNotifications

public boolean getSendPastNotifications()
Specified by:
getSendPastNotifications in interface TimerMBean

setSendPastNotifications

public void setSendPastNotifications(boolean value)
Specified by:
setSendPastNotifications in interface TimerMBean

getNbNotifications

public int getNbNotifications()
Specified by:
getNbNotifications in interface TimerMBean

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface TimerMBean

getNotificationType

public java.lang.String getNotificationType(java.lang.Integer id)
Specified by:
getNotificationType in interface TimerMBean

getNotificationMessage

public java.lang.String getNotificationMessage(java.lang.Integer id)
Specified by:
getNotificationMessage in interface TimerMBean

getNotificationUserData

public java.lang.Object getNotificationUserData(java.lang.Integer id)
Specified by:
getNotificationUserData in interface TimerMBean

getDate

public java.util.Date getDate(java.lang.Integer id)
Specified by:
getDate in interface TimerMBean

getPeriod

public java.lang.Long getPeriod(java.lang.Integer id)
Specified by:
getPeriod in interface TimerMBean

getNbOccurences

public java.lang.Long getNbOccurences(java.lang.Integer id)
Specified by:
getNbOccurences in interface TimerMBean