📄 timer.html
字号:
<P> If the timer notification to be inserted has a date that is before the current date, the method behaves as if the specified date were the current date and the notification is delivered immediately.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/timer/TimerMBean.html#addNotification(java.lang.String, java.lang.String, java.lang.Object, java.util.Date)">addNotification</A></CODE> in interface <CODE><A HREF="../../../javax/management/timer/TimerMBean.html" title="interface in javax.management.timer">TimerMBean</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>type</CODE> - The timer notification type.<DD><CODE>message</CODE> - The timer notification detailed message.<DD><CODE>userData</CODE> - The timer notification user data object.<DD><CODE>date</CODE> - The date when the notification occurs.<DT><B>Returns:</B><DD>The identifier of the new created timer notification.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - The date notification is before the current date.</DL></DD></DL><HR><A NAME="removeNotification(java.lang.Integer)"><!-- --></A><H3>removeNotification</H3><PRE>public void <B>removeNotification</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Integer.html" title="class or interface in java.lang">Integer</A> id) throws <A HREF="../../../javax/management/InstanceNotFoundException.html" title="class in javax.management">InstanceNotFoundException</A></PRE><DL><DD>Removes the timer notification corresponding to the specified identifier from the list of notifications.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/timer/TimerMBean.html#removeNotification(java.lang.Integer)">removeNotification</A></CODE> in interface <CODE><A HREF="../../../javax/management/timer/TimerMBean.html" title="interface in javax.management.timer">TimerMBean</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>id</CODE> - The timer notification identifier.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/management/InstanceNotFoundException.html" title="class in javax.management">InstanceNotFoundException</A></CODE> - The specified identifier does not correspond to any timer notification in the list of notifications of this timer MBean.</DL></DD></DL><HR><A NAME="removeNotifications(java.lang.String)"><!-- --></A><H3>removeNotifications</H3><PRE>public void <B>removeNotifications</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> type) throws <A HREF="../../../javax/management/InstanceNotFoundException.html" title="class in javax.management">InstanceNotFoundException</A></PRE><DL><DD>Removes all the timer notifications corresponding to the specified type from the list of notifications.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/timer/TimerMBean.html#removeNotifications(java.lang.String)">removeNotifications</A></CODE> in interface <CODE><A HREF="../../../javax/management/timer/TimerMBean.html" title="interface in javax.management.timer">TimerMBean</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>type</CODE> - The timer notification type.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/management/InstanceNotFoundException.html" title="class in javax.management">InstanceNotFoundException</A></CODE> - The specified type does not correspond to any timer notification in the list of notifications of this timer MBean.</DL></DD></DL><HR><A NAME="removeAllNotifications()"><!-- --></A><H3>removeAllNotifications</H3><PRE>public void <B>removeAllNotifications</B>()</PRE><DL><DD>Removes all the timer notifications from the list of notifications and resets the counter used to update the timer notification identifiers.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/timer/TimerMBean.html#removeAllNotifications()">removeAllNotifications</A></CODE> in interface <CODE><A HREF="../../../javax/management/timer/TimerMBean.html" title="interface in javax.management.timer">TimerMBean</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="getNbNotifications()"><!-- --></A><H3>getNbNotifications</H3><PRE>public int <B>getNbNotifications</B>()</PRE><DL><DD>Gets the number of timer notifications registered into the list of notifications.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/timer/TimerMBean.html#getNbNotifications()">getNbNotifications</A></CODE> in interface <CODE><A HREF="../../../javax/management/timer/TimerMBean.html" title="interface in javax.management.timer">TimerMBean</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>The number of timer notifications.</DL></DD></DL><HR><A NAME="getAllNotificationIDs()"><!-- --></A><H3>getAllNotificationIDs</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Vector.html" title="class or interface in java.util">Vector</A> <B>getAllNotificationIDs</B>()</PRE><DL><DD>Gets all timer notification identifiers registered into the list of notifications.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/timer/TimerMBean.html#getAllNotificationIDs()">getAllNotificationIDs</A></CODE> in interface <CODE><A HREF="../../../javax/management/timer/TimerMBean.html" title="interface in javax.management.timer">TimerMBean</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>A vector of <CODE>Integer</CODE> objects containing all the timer notification identifiers. <BR>The vector is empty if there is no timer notification registered for this timer MBean.</DL></DD></DL><HR><A NAME="getNotificationIDs(java.lang.String)"><!-- --></A><H3>getNotificationIDs</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Vector.html" title="class or interface in java.util">Vector</A> <B>getNotificationIDs</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> type)</PRE><DL><DD>Gets all the identifiers of timer notifications corresponding to the specified type.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/timer/TimerMBean.html#getNotificationIDs(java.lang.String)">getNotificationIDs</A></CODE> in interface <CODE><A HREF="../../../javax/management/timer/TimerMBean.html" title="interface in javax.management.timer">TimerMBean</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>type</CODE> - The timer notification type.<DT><B>Returns:</B><DD>A vector of <CODE>Integer</CODE> objects containing all the identifiers of timer notifications with the specified <CODE>type</CODE>. <BR>The vector is empty if there is no timer notifications registered for this timer MBean with the specified <CODE>type</CODE>.</DL></DD></DL><HR><A NAME="getNotificationType(java.lang.Integer)"><!-- --></A><H3>getNotificationType</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getNotificationType</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Integer.html" title="class or interface in java.lang">Integer</A> id)</PRE><DL><DD>Gets the timer notification type corresponding to the specified identifier.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/timer/TimerMBean.html#getNotificationType(java.lang.Integer)">getNotificationType</A></CODE> in interface <CODE><A HREF="../../../javax/management/timer/TimerMBean.html" title="interface in javax.management.timer">TimerMBean</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>id</CODE> - The timer notification identifier.<DT><B>Returns:</B><DD>The timer notification type or null if the identifier is not mapped to any timer notification registered for this timer MBean.</DL></DD></DL><HR><A NAME="getNotificationMessage(java.lang.Integer)"><!-- --></A><H3>getNotificationMessage</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getNotificationMessage</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Integer.html" title="class or interface in java.lang">Integer</A> id)</PRE><DL><DD>Gets the timer notification detailed message corresponding to the specified identifier.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/timer/TimerMBean.html#getNotificationMessage(java.lang.Integer)">getNotificationMessage</A></CODE> in interface <CODE><A HREF="../../../javax/management/timer/TimerMBean.html" title="interface in javax.management.timer">TimerMBean</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>id</CODE> - The timer notification identifier.<DT><B>Returns:</B><DD>The timer notification detailed message or null if the identifier is not mapped to any timer notification registered for this timer MBean.</DL></DD></DL><HR><A NAME="getNotificationUserData(java.lang.Integer)"><!-- --></A><H3>getNotificationUserData</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>getNotificationUserData</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Integer.html" title="class or interface in java.lang">Integer</A> id)</PRE><DL><DD>Gets the timer notification user data object corresponding to the specified identifier.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/timer/TimerMBean.html#getNotificationUserData(java.lang.Integer)">getNotificationUserData</A></CODE> in interface <CODE><A HREF="../../../javax/management/timer/TimerMBean.html" title="interface in javax.management.timer">TimerMBean</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>id</CODE> - The timer notification identifier.<DT><B>Returns:</B><DD>The timer notification user data object or null if the identifier is not mapped to any timer notification registered for this timer MBean.</DL></DD></DL><HR><A NAME="getDate(java.lang.Integer)"><!-- --></A><H3>getDate</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Date.html" title="class or interface in java.util">Date</A> <B>getDate</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Integer.html" title="class or interface in java.lang">Integer</A> id)</PRE><DL><DD>Gets a copy of the date associated to a timer notification.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/timer/TimerMBean.html#getDate(java.lang.Integer)">getDate</A></CODE> in interface <CODE><A HREF="../../../javax/management/timer/TimerMBean.html" title="interface in javax.management.timer">TimerMBean</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>id</CODE> - The timer notification identifier.<DT><B>Returns:</B><DD>A copy of the date or null if the identifier is not mapped to any timer notification registered for this timer MBean.</DL></DD></DL><HR><A NAME="getPeriod(java.lang.Integer)"><!-- --></A><H3>getPeriod</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Long.html" title="class or interface in java.lang">Long</A> <B>getPeriod</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Integer.html" title="class or interface in java.lang">Integer</A> id)</PRE><DL><DD>Gets a copy of the period (in milliseconds) associated to a timer notification.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/timer/TimerMBean.html#getPeriod(java.lang.Integer)">getPeriod</A></CODE> in interface <CODE><A HREF="../../../javax/management/timer/TimerMBean.html" title="interface in javax.management.timer">TimerMBean</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>id</CODE> - The timer notification identifier.<DT><B>Returns:</B><DD>A copy of the period or nu
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -