API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.management.timer. Timer View Source
Author(s)
Sun Microsystems, Inc
Since
1.5
Version
4.63 12/29/05
Serial
Hierarchy
 Object
      NotificationBroadcasterSupport
          Timer
Implements
 TimerMBean
 MBeanRegistration
Subclasses
Description
public class Timer
  Provides the implementation of the timer MBean.
See also:   
Constructors
public Timer ()
Default constructor.
Methods
Hide/Show inherited methods
publicsynchronized Integer addNotification (String type, String message, Object userData, Date date) throws IllegalArgumentException [Specified in TimerMBean]
  Creates a new timer notification with the specified type, message and userData and inserts it into the list of notifications with a given date and a null period and number of occurrences.
publicsynchronized Integer addNotification (String type, String message, Object userData, Date date, long period) throws IllegalArgumentException [Specified in TimerMBean]
  Creates a new timer notification with the specified type, message and userData and inserts it into the list of notifications with a given date and period and a null number of occurrences.
publicsynchronized Integer addNotification (String type, String message, Object userData, Date date, long period, long nbOccurences) throws IllegalArgumentException [Specified in TimerMBean]
  Creates a new timer notification with the specified type, message and userData and inserts it into the list of notifications with a given date, period and number of occurrences.
publicsynchronized Integer addNotification (String type, String message, Object userData, Date date, long period, long nbOccurences, boolean fixedRate) throws IllegalArgumentException [Specified in TimerMBean]
  Creates a new timer notification with the specified type, message and userData and inserts it into the list of notifications with a given date, period and number of occurrences.
public void addNotificationListener (NotificationListener listener, NotificationFilter filter, Object handback) [Inherited From NotificationBroadcasterSupport]
  Adds a listener.
pack-private void debug (String func, String info)
pack-private void debug (String clz, String func, String info)
publicsynchronized Vector<Integer> getAllNotificationIDs () [Specified in TimerMBean]
  Gets all timer notification identifiers registered into the list of notifications.
public Date getDate (Integer id) [Specified in TimerMBean]
  Gets a copy of the date associated to a timer notification.
public Boolean getFixedRate (Integer id) [Specified in TimerMBean]
  Gets a copy of the flag indicating whether a periodic notification is executed at fixed-delay or at fixed-rate.
public int getNbNotifications () [Specified in TimerMBean]
  Gets the number of timer notifications registered into the list of notifications.
public Long getNbOccurences (Integer id) [Specified in TimerMBean]
  Gets a copy of the remaining number of occurrences associated to a timer notification.
publicsynchronized Vector<Integer> getNotificationIDs (String type) [Specified in TimerMBean]
  Gets all the identifiers of timer notifications corresponding to the specified type.
publicsynchronized MBeanNotificationInfo getNotificationInfo () [Overrides NotificationBroadcasterSupport]
public String getNotificationMessage (Integer id) [Specified in TimerMBean]
  Gets the timer notification detailed message corresponding to the specified identifier.
public String getNotificationType (Integer id) [Specified in TimerMBean]
  Gets the timer notification type corresponding to the specified identifier.
public Object getNotificationUserData (Integer id) [Specified in TimerMBean]
  Gets the timer notification user data object corresponding to the specified identifier.
public Long getPeriod (Integer id) [Specified in TimerMBean]
  Gets a copy of the period (in milliseconds) associated to a timer notification.
public boolean getSendPastNotifications () [Specified in TimerMBean]
  Gets the flag indicating whether or not the timer sends past notifications.
protected void handleNotification (NotificationListener listener, Notification notif, Object handback) [Inherited From NotificationBroadcasterSupport]
  This method is called by sendNotification for each listener in order to send the notification to that listener.
public boolean isActive () [Specified in TimerMBean]
  Tests whether the timer MBean is active.
pack-private boolean isDebugOn ()
public boolean isEmpty () [Specified in TimerMBean]
  Tests whether the list of timer notifications is empty.
pack-private boolean isTraceOn ()
@SuppressWarnings (value="deprecation")
pack-private void notifyAlarmClock (TimerAlarmClockNotification notification)
  This method is called by the timer each time the TimerAlarmClock has exceeded its timeout.
public void postDeregister () [Specified in MBeanRegistration]
  Allows the timer MBean to perform any operations needed after having been unregistered by the MBean server.
public void postRegister (Boolean registrationDone) [Specified in MBeanRegistration]
  Allows the timer MBean to perform any operations needed after having been registered in the MBean server or after the registration has failed.
public void preDeregister () throws Exception [Specified in MBeanRegistration]
  Allows the timer MBean to perform any operations it needs before being unregistered by the MBean server.
public ObjectName preRegister (MBeanServer server, ObjectName name) throws Exception [Specified in MBeanRegistration]
  Allows the timer MBean to perform any operations it needs before being registered in the MBean server.
publicsynchronized void removeAllNotifications () [Specified in TimerMBean]
Removes all the timer notifications from the list of notifications and resets the counter used to update the timer notification identifiers.
publicsynchronized void removeNotification (Integer id) throws InstanceNotFoundException [Specified in TimerMBean]
  Removes the timer notification corresponding to the specified identifier from the list of notifications.
public void removeNotificationListener (NotificationListener listener) throws ListenerNotFoundException [Inherited From NotificationBroadcasterSupport]
public void removeNotificationListener (NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException [Inherited From NotificationBroadcasterSupport]
publicsynchronized void removeNotifications (String type) throws InstanceNotFoundException [Specified in TimerMBean]
  Removes all the timer notifications corresponding to the specified type from the list of notifications.
pack-private void sendNotification (Date timeStamp, TimerNotification notification)
  This method is used by the timer MBean to update and send a timer notification to all the listeners registered for this kind of notification.
public void sendNotification (Notification notification) [Inherited From NotificationBroadcasterSupport]
  Sends a notification.
public void setSendPastNotifications (boolean value) [Specified in TimerMBean]
  Sets the flag indicating whether the timer sends past notifications or not.
publicsynchronized void start () [Specified in TimerMBean]
  Starts the timer.
publicsynchronized void stop () [Specified in TimerMBean]
Stops the timer.
pack-private void trace (String func, String info)
pack-private void trace (String clz, String func, String info)
Fields
Hide/Show inherited fields
publicfinalstatic long ONE_DAY = "86400000"
  Number of milliseconds in one day.
publicfinalstatic long ONE_HOUR = "3600000"
  Number of milliseconds in one hour.
publicfinalstatic long ONE_MINUTE = "60000"
  Number of milliseconds in one minute.
publicfinalstatic long ONE_SECOND = "1000"
  Number of milliseconds in one second.
publicfinalstatic long ONE_WEEK = "604800000"
  Number of milliseconds in one week.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar