public final class Timer extends Timer implements TimerMBean, NotificationBroadcaster, Serializable
ONE_DAY, ONE_HOUR, ONE_MINUTE, ONE_SECOND, ONE_WEEK| Modifier and Type | Method and Description |
|---|---|
Integer |
addNotification(String type,
String message,
Object userData,
Date date)
Adds a feature to the Notification attribute of the Timer object
|
Integer |
addNotification(String type,
String message,
Object userData,
Date date,
long period)
Adds a feature to the Notification attribute of the Timer object
|
Integer |
addNotification(String type,
String message,
Object userData,
Date date,
long period,
long nbOccurences)
Adds a feature to the Notification attribute of the Timer object
|
Integer |
addNotification(String type,
String message,
Object userData,
Date date,
long period,
long nbOccurences,
boolean fixedRate) |
void |
addNotificationListener(NotificationListener listener,
NotificationFilter filter,
Object handback)
Adds a feature to the NotificationListener attribute of the Timer object
|
void |
deliverNotifications(Notification tn)
Description of the Method
|
Vector |
getAllNotificationIDs()
Gets the allNotificationIDs attribute of the Timer object
|
Date |
getDate(Integer id)
Gets the date attribute of the Timer object
|
Boolean |
getFixedRate(Integer id) |
int |
getNbNotifications()
Gets the nbNotifications attribute of the Timer object
|
Long |
getNbOccurences(Integer id)
Gets the nbOccurences attribute of the Timer object
|
Vector |
getNotificationIDs(String type)
Gets the notificationIDs attribute of the Timer object
|
MBeanNotificationInfo[] |
getNotificationInfo()
Gets the notificationInfo attribute of the Timer object
|
String |
getNotificationMessage(Integer id)
Gets the notificationMessage attribute of the Timer object
|
String |
getNotificationType(Integer id)
Gets the notificationType attribute of the Timer object
|
Object |
getNotificationUserData(Integer id)
Gets the notificationUserData attribute of the Timer object
|
Long |
getPeriod(Integer id)
Gets the period attribute of the Timer object
|
boolean |
getSendPastNotifications()
Gets the sendPastNotifications attribute of the Timer object
|
boolean |
isActive()
Gets the active attribute of the Timer object
|
boolean |
isEmpty()
Gets the empty attribute of the Timer object
|
void |
removeAllNotifications()
Description of the Method
|
void |
removeNotification(Integer id)
Description of the Method
|
void |
removeNotificationListener(NotificationListener listener)
Description of the Method
|
void |
removeNotifications(String type)
Description of the Method
|
void |
setSendPastNotifications(boolean value)
Sets the sendPastNotifications attribute of the Timer object
|
void |
start()
Starts the timer.
|
void |
stop()
Stops the timer
|
postDeregister, postRegister, preDeregister, preRegisterhandleNotification, removeNotificationListener, sendNotificationpublic int getNbNotifications()
getNbNotifications in interface TimerMBeangetNbNotifications in class Timerpublic Vector getAllNotificationIDs()
getAllNotificationIDs in interface TimerMBeangetAllNotificationIDs in class Timerpublic Vector getNotificationIDs(String type)
getNotificationIDs in interface TimerMBeangetNotificationIDs in class Timertype - Description of the Parameterpublic String getNotificationType(Integer id)
getNotificationType in interface TimerMBeangetNotificationType in class Timerid - Description of the Parameterpublic String getNotificationMessage(Integer id)
getNotificationMessage in interface TimerMBeangetNotificationMessage in class Timerid - Description of the Parameterpublic Object getNotificationUserData(Integer id)
getNotificationUserData in interface TimerMBeangetNotificationUserData in class Timerid - Description of the Parameterpublic Date getDate(Integer id)
getDate in interface TimerMBeangetDate in class Timerid - Description of the Parameterpublic Long getPeriod(Integer id)
getPeriod in interface TimerMBeangetPeriod in class Timerid - Description of the Parameterpublic Long getNbOccurences(Integer id)
getNbOccurences in interface TimerMBeangetNbOccurences in class Timerid - Description of the Parameterpublic Boolean getFixedRate(Integer id)
getFixedRate in interface TimerMBeangetFixedRate in class Timerpublic boolean getSendPastNotifications()
getSendPastNotifications in interface TimerMBeangetSendPastNotifications in class Timerpublic boolean isActive()
isActive in interface TimerMBeanisActive in class Timerpublic boolean isEmpty()
isEmpty in interface TimerMBeanisEmpty in class Timerpublic MBeanNotificationInfo[] getNotificationInfo()
getNotificationInfo in interface NotificationBroadcastergetNotificationInfo in class Timerpublic void setSendPastNotifications(boolean value)
setSendPastNotifications in interface TimerMBeansetSendPastNotifications in class Timervalue - The new sendPastNotifications valuepublic void start()
start in interface TimerMBeanstart in class Timerpublic void stop()
stop in interface TimerMBeanstop in class Timerpublic Integer addNotification(String type, String message, Object userData, Date date, long period, long nbOccurences) throws IllegalArgumentException
addNotification in interface TimerMBeanaddNotification in class Timertype - The feature to be added to the Notification attributemessage - The feature to be added to the Notification attributeuserData - The feature to be added to the Notification attributedate - The feature to be added to the Notification attributeperiod - The feature to be added to the Notification attributenbOccurences - The feature to be added to the Notification attributeIllegalArgumentException - Description of the Exceptionpublic Integer addNotification(String type, String message, Object userData, Date date, long period, long nbOccurences, boolean fixedRate) throws IllegalArgumentException
addNotification in interface TimerMBeanaddNotification in class TimerIllegalArgumentExceptionpublic Integer addNotification(String type, String message, Object userData, Date date, long period) throws IllegalArgumentException
addNotification in interface TimerMBeanaddNotification in class Timertype - The feature to be added to the Notification attributemessage - The feature to be added to the Notification attributeuserData - The feature to be added to the Notification attributedate - The feature to be added to the Notification attributeperiod - The feature to be added to the Notification attributeIllegalArgumentException - Description of the Exceptionpublic Integer addNotification(String type, String message, Object userData, Date date) throws IllegalArgumentException
addNotification in interface TimerMBeanaddNotification in class Timertype - The feature to be added to the Notification attributemessage - The feature to be added to the Notification attributeuserData - The feature to be added to the Notification attributedate - The feature to be added to the Notification attributeIllegalArgumentException - Description of the Exceptionpublic void removeNotification(Integer id) throws InstanceNotFoundException
removeNotification in interface TimerMBeanremoveNotification in class Timerid - Description of the ParameterInstanceNotFoundException - Description of the Exceptionpublic void removeNotifications(String type) throws InstanceNotFoundException
removeNotifications in interface TimerMBeanremoveNotifications in class Timertype - Description of the ParameterInstanceNotFoundException - Description of the Exceptionpublic void removeAllNotifications()
removeAllNotifications in interface TimerMBeanremoveAllNotifications in class Timerpublic void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws IllegalArgumentException
addNotificationListener in interface NotificationBroadcasteraddNotificationListener in class NotificationBroadcasterSupportlistener - The feature to be added to the NotificationListener attributefilter - The feature to be added to the NotificationListener attributehandback - The feature to be added to the NotificationListener attributeIllegalArgumentException - Description of the Exceptionpublic void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException
removeNotificationListener in interface NotificationBroadcasterremoveNotificationListener in class NotificationBroadcasterSupportlistener - Description of the ParameterListenerNotFoundException - Description of the Exceptionpublic void deliverNotifications(Notification tn)
tn - Description of the Parameter