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

📄 timer.html

📁 j2ee api,很好的api。我这现在有
💻 HTML
📖 第 1 页 / 共 5 页
字号:
</DL><HR><A NAME="preDeregister()"><!-- --></A><H3>preDeregister</H3><PRE>public void <B>preDeregister</B>()                   throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Exception.html" title="class or interface in java.lang">Exception</A></PRE><DL><DD>Allows the timer MBean to perform any operations it needs before being unregistered by the MBean server. <P> Stops the timer.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/MBeanRegistration.html#preDeregister()">preDeregister</A></CODE> in interface <CODE><A HREF="../../../javax/management/MBeanRegistration.html" title="interface in javax.management">MBeanRegistration</A></CODE></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Exception.html" title="class or interface in java.lang">Exception</A></CODE></DL></DD></DL><HR><A NAME="postDeregister()"><!-- --></A><H3>postDeregister</H3><PRE>public void <B>postDeregister</B>()</PRE><DL><DD>Allows the timer MBean to perform any operations needed after having been unregistered by the MBean server. <P> Not used in this context.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/MBeanRegistration.html#postDeregister()">postDeregister</A></CODE> in interface <CODE><A HREF="../../../javax/management/MBeanRegistration.html" title="interface in javax.management">MBeanRegistration</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><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><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/timer/TimerMBean.html#start()">start</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="stop()"><!-- --></A><H3>stop</H3><PRE>public void <B>stop</B>()</PRE><DL><DD>Stops the timer.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/timer/TimerMBean.html#stop()">stop</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="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>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, long, long, boolean)">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.<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                  is scheduled with a <i>fixed-delay</i> execution scheme. Ignored if the                  notification is not periodic.<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 period or the number of occurences is negative<DT><B>See Also:</B><DD><A HREF="../../../javax/management/timer/Timer.html#addNotification(java.lang.String, java.lang.String, java.lang.Object, java.util.Date, long, long)"><CODE>addNotification(String, String, Object, Date, long, long)</CODE></A></DL></DD></DL><HR><A NAME="addNotification(java.lang.String, java.lang.String, java.lang.Object, java.util.Date, long, long)"><!-- --></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)                        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, uses a <i>fixed-delay</i> 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>. In order to use a <i>fixed-rate</i> execution scheme, use  <A HREF="../../../javax/management/timer/Timer.html#addNotification(java.lang.String, java.lang.String, java.lang.Object, java.util.Date, long, long, boolean)"><CODE>addNotification(String, String, Object, Date, long, long, boolean)</CODE></A> instead.<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, long, long)">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.<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.<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 period or the number of occurences is negative<DT><B>See Also:</B><DD><A HREF="../../../javax/management/timer/Timer.html#addNotification(java.lang.String, java.lang.String, java.lang.Object, java.util.Date, long, long, boolean)"><CODE>addNotification(String, String, Object, Date, long, long, boolean)</CODE></A></DL></DD></DL><HR><A NAME="addNotification(java.lang.String, java.lang.String, java.lang.Object, java.util.Date, long)"><!-- --></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)                        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 and period and a null number of occurences. <P> The timer notification will repeat continuously using the timer period using a <i>fixed-delay</i> 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>. In order to use a <i>fixed-rate</i> execution scheme, use <A HREF="../../../javax/management/timer/Timer.html#addNotification(java.lang.String, java.lang.String, java.lang.Object, java.util.Date, long, long, boolean)"><CODE>addNotification(String, String, Object, Date, long, long, boolean)</CODE></A> instead.  <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. The first notification is delivered immediately and the subsequent ones are spaced as specified by the period parameter.<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, long)">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.<DD><CODE>period</CODE> - The period of the timer notification (in milliseconds).<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 period is negative or the date notification is before the current date.</DL></DD></DL><HR><A NAME="addNotification(java.lang.String, java.lang.String, java.lang.Object, java.util.Date)"><!-- --></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)                        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 and a null period and number of occurences. <P> The timer notification will be handled once at the specified date.

⌨️ 快捷键说明

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