⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 timermbean.html

📁 j2ee api,很好的api。我这现在有
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/management/timer/TimerMBean.html#getNbNotifications()">getNbNotifications</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the number of timer notifications registered into the list of notifications.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Long.html" title="class or interface in java.lang">Long</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/management/timer/TimerMBean.html#getNbOccurences(java.lang.Integer)">getNbOccurences</A></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>&nbsp;id)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets a copy of the remaining number of occurences associated to a timer notification.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Vector.html" title="class or interface in java.util">Vector</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/management/timer/TimerMBean.html#getNotificationIDs(java.lang.String)">getNotificationIDs</A></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>&nbsp;type)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets all the identifiers of timer notifications corresponding to the specified type.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/management/timer/TimerMBean.html#getNotificationMessage(java.lang.Integer)">getNotificationMessage</A></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>&nbsp;id)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the timer notification detailed message corresponding to the specified identifier.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/management/timer/TimerMBean.html#getNotificationType(java.lang.Integer)">getNotificationType</A></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>&nbsp;id)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the timer notification type corresponding to the specified identifier.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/management/timer/TimerMBean.html#getNotificationUserData(java.lang.Integer)">getNotificationUserData</A></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>&nbsp;id)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the timer notification user data object corresponding to the specified identifier.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Long.html" title="class or interface in java.lang">Long</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/management/timer/TimerMBean.html#getPeriod(java.lang.Integer)">getPeriod</A></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>&nbsp;id)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets a copy of the period (in milliseconds) associated to a timer notification.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/management/timer/TimerMBean.html#getSendPastNotifications()">getSendPastNotifications</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the flag indicating whether or not the timer sends past notifications.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/management/timer/TimerMBean.html#isActive()">isActive</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tests whether the timer MBean is active. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/management/timer/TimerMBean.html#isEmpty()">isEmpty</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tests whether the list of timer notifications is empty.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/management/timer/TimerMBean.html#removeAllNotifications()">removeAllNotifications</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes all the timer notifications from the list of notifications and resets the counter used to update the timer notification identifiers.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/management/timer/TimerMBean.html#removeNotification(java.lang.Integer)">removeNotification</A></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>&nbsp;id)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes the timer notification corresponding to the specified identifier from the list of notifications.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/management/timer/TimerMBean.html#removeNotifications(java.lang.String)">removeNotifications</A></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>&nbsp;type)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes all the timer notifications corresponding to the specified type from the list of notifications.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/management/timer/TimerMBean.html#setSendPastNotifications(boolean)">setSendPastNotifications</A></B>(boolean&nbsp;value)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the flag indicating whether the timer sends past notifications or not.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/management/timer/TimerMBean.html#start()">start</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Starts the timer. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/management/timer/TimerMBean.html#stop()">stop</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Stops the timer.</TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="start()"><!-- --></A><H3>start</H3><PRE>public void <B>start</B>()</PRE><DL><DD>Starts the timer. <P> If there is one or more timer notifications before the time in the list of notifications, the notification is sent according to the <CODE>sendPastNotifications</CODE> flag and then, updated according to its period and remaining number of occurences. If the timer notification date remains earlier than the current date, this notification is just removed  from the list of notifications.<P><DD><DL></DL></DD></DL><HR><A NAME="stop()"><!-- --></A><H3>stop</H3><PRE>public void <B>stop</B>()</PRE><DL><DD>Stops the timer.<P><DD><DL></DL></DD></DL><HR><A NAME="addNotification(java.lang.String, java.lang.String, java.lang.Object, java.util.Date, long, long, boolean)"><!-- --></A><H3>addNotification</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Integer.html" title="class or interface in java.lang">Integer</A> <B>addNotification</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>&nbsp;type,                               <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;message,                               <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;userData,                               <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Date.html" title="class or interface in java.util">Date</A>&nbsp;date,                               long&nbsp;period,                               long&nbsp;nbOccurences,                               boolean&nbsp;fixedRate)                        throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></PRE><DL><DD>Creates a new timer notification with the specified <CODE>type</CODE>, <CODE>message</CODE>  and <CODE>userData</CODE> and inserts it into the list of notifications with a given date,  period and number of occurences. <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. <BR> For once-off notifications, the notification is delivered immediately. <BR> For periodic notifications, the first notification is delivered immediately and the subsequent ones are spaced as specified by the period parameter.  <P> Note that once the timer notification has been added into the list of notifications, its associated date, period and number of occurences cannot be updated. <P> In the case of a periodic notification, the value of parameter <i>fixedRate</i> is used to specify the execution scheme, as specified in <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Timer.html" title="class or interface in java.util"><CODE>Timer</CODE></A>.<P><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.<DD><CODE>period</CODE> - The period of the timer notification (in milliseconds).<DD><CODE>nbOccurences</CODE> - The total number the timer notification will be emitted.<DD><CODE>fixedRate</CODE> - If <code>true</code> and if the notification is periodic, the notification                  is scheduled with a <i>fixed-rate</i> execution scheme. If                  <code>false</code> and if the notification is periodic, the notification

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -