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

📄 taskengine.html

📁 开源软件openfire的API文件。进行openfire的二次开发所必需的工具。
💻 HTML
📖 第 1 页 / 共 3 页
字号:
 that require "smoothness."  In other words, it is appropriate for activities where it is more important to keep the frequency accurate in the short run than in the long run.  This includes most animation tasks, such as blinking a cursor at regular intervals.  It also includes tasks wherein regular activity is performed in response to human input, such as automatically repeating a character as long as a key is held down.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>task</CODE> - task to be scheduled.<DD><CODE>firstTime</CODE> - First time at which task is to be executed.<DD><CODE>period</CODE> - time in milliseconds between successive task executions.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if <tt>time.getTime()</tt> is negative.<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if task was already scheduled or         cancelled, timer was cancelled, or timer thread terminated.</DL></DD></DL><HR><A NAME="scheduleAtFixedRate(java.util.TimerTask, long, long)"><!-- --></A><H3>scheduleAtFixedRate</H3><PRE>public void <B>scheduleAtFixedRate</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/TimerTask.html" title="class or interface in java.util">TimerTask</A>&nbsp;task,                                long&nbsp;delay,                                long&nbsp;period)</PRE><DL><DD>Schedules the specified task for repeated <i>fixed-rate execution</i>, beginning after the specified delay.  Subsequent executions take place at approximately regular intervals, separated by the specified period. <p>In fixed-rate execution, each execution is scheduled relative to the scheduled execution time of the initial execution.  If an execution is delayed for any reason (such as garbage collection or other background activity), two or more executions will occur in rapid succession to "catch up."  In the long run, the frequency of execution will be exactly the reciprocal of the specified period (assuming the system clock underlying <tt>Object.wait(long)</tt> is accurate). <p>Fixed-rate execution is appropriate for recurring activities that are sensitive to <i>absolute</i> time, such as ringing a chime every hour on the hour, or running scheduled maintenance every day at a particular time.  It is also appropriate for recurring activities where the total time to perform a fixed number of executions is important, such as a countdown timer that ticks once every second for ten seconds.  Finally, fixed-rate execution is appropriate for scheduling multiple repeating timer tasks that must remain synchronized with respect to one another.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>task</CODE> - task to be scheduled.<DD><CODE>delay</CODE> - delay in milliseconds before task is to be executed.<DD><CODE>period</CODE> - time in milliseconds between successive task executions.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if <tt>delay</tt> is negative, or         <tt>delay + System.currentTimeMillis()</tt> is negative.<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if task was already scheduled or         cancelled, timer was cancelled, or timer thread terminated.</DL></DD></DL><HR><A NAME="scheduleAtFixedRate(java.util.TimerTask, java.util.Date, long)"><!-- --></A><H3>scheduleAtFixedRate</H3><PRE>public void <B>scheduleAtFixedRate</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/TimerTask.html" title="class or interface in java.util">TimerTask</A>&nbsp;task,                                <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Date.html" title="class or interface in java.util">Date</A>&nbsp;firstTime,                                long&nbsp;period)</PRE><DL><DD>Schedules the specified task for repeated <i>fixed-rate execution</i>, beginning at the specified time. Subsequent executions take place at approximately regular intervals, separated by the specified period. <p>In fixed-rate execution, each execution is scheduled relative to the scheduled execution time of the initial execution.  If an execution is delayed for any reason (such as garbage collection or other background activity), two or more executions will occur in rapid succession to "catch up."  In the long run, the frequency of execution will be exactly the reciprocal of the specified period (assuming the system clock underlying <tt>Object.wait(long)</tt> is accurate). <p>Fixed-rate execution is appropriate for recurring activities that are sensitive to <i>absolute</i> time, such as ringing a chime every hour on the hour, or running scheduled maintenance every day at a particular time.  It is also appropriate for recurring activities where the total time to perform a fixed number of executions is important, such as a countdown timer that ticks once every second for ten seconds.  Finally, fixed-rate execution is appropriate for scheduling multiple repeating timer tasks that must remain synchronized with respect to one another.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>task</CODE> - task to be scheduled.<DD><CODE>firstTime</CODE> - First time at which task is to be executed.<DD><CODE>period</CODE> - time in milliseconds between successive task executions.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if <tt>time.getTime()</tt> is negative.<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if task was already scheduled or         cancelled, timer was cancelled, or timer thread terminated.</DL></DD></DL><HR><A NAME="cancelScheduledTask(java.util.TimerTask)"><!-- --></A><H3>cancelScheduledTask</H3><PRE>public void <B>cancelScheduledTask</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/TimerTask.html" title="class or interface in java.util">TimerTask</A>&nbsp;task)</PRE><DL><DD>Cancels the execution of a scheduled task. <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/TimerTask.html#cancel()" title="class or interface in java.util"><CODE>TimerTask.cancel()</CODE></A><P><DD><DL><DT><B>Parameters:</B><DD><CODE>task</CODE> - the scheduled task to cancel.</DL></DD></DL><HR><A NAME="shutdown()"><!-- --></A><H3>shutdown</H3><PRE>public void <B>shutdown</B>()</PRE><DL><DD>Shuts down the task engine service.<P><DD><DL></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Openfire 3.6.0a Javadoc</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../org/jivesoftware/util/StringUtils.html" title="class in org.jivesoftware.util"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../org/jivesoftware/util/Version.html" title="class in org.jivesoftware.util"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../index.html?org/jivesoftware/util/TaskEngine.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="TaskEngine.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<SCRIPT type="text/javascript">  <!--  if(window==top) {    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT>  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><i>Copyright &copy; 2003-2008 Jive Software.</i></BODY></HTML>

⌨️ 快捷键说明

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