📄 timerservice.html
字号:
<P><DD><DL><DT><B>Parameters:</B><DD><CODE>duration</CODE> - The number of milliseconds that must elapse before the timer expires.<DD><CODE>info</CODE> - Application information to be delivered along with the timer expiration notification. This can be null.<DT><B>Returns:</B><DD>The newly created Timer.<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> - If duration is negative<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - If this method is invoked while the instance is in a state that does not allow access to this method.<DD><CODE><A HREF="../../javax/ejb/EJBException.html" title="class in javax.ejb">EJBException</A></CODE> - If this method fails due to a system-level failure.</DL></DD></DL><HR><A NAME="createTimer(long, long, java.io.Serializable)"><!-- --></A><H3>createTimer</H3><PRE>public <A HREF="../../javax/ejb/Timer.html" title="interface in javax.ejb">Timer</A> <B>createTimer</B>(long initialDuration, long intervalDuration, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/Serializable.html" title="class or interface in java.io">Serializable</A> info) 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>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A>, <A HREF="../../javax/ejb/EJBException.html" title="class in javax.ejb">EJBException</A></PRE><DL><DD>Create an interval timer whose first expiration occurs after a specified duration, and whose subsequent expirations occur after a specified interval.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>initialDuration</CODE> - The number of milliseconds that must elapse before the first timer expiration notification.<DD><CODE>intervalDuration</CODE> - The number of milliseconds that must elapse between timer expiration notifications. Expiration notifications are scheduled relative to the time of the first expiration. If expiration is delayed(e.g. due to the interleaving of other method calls on the bean) two or more expiration notifications may occur in close succession to "catch up".<DD><CODE>info</CODE> - Application information to be delivered along with the timer expiration. This can be null.<DT><B>Returns:</B><DD>The newly created Timer.<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> - If initialDuration is negative, or intervalDuration is negative.<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - If this method is invoked while the instance is in a state that does not allow access to this method.<DD><CODE><A HREF="../../javax/ejb/EJBException.html" title="class in javax.ejb">EJBException</A></CODE> - If this method could not complete due to a system-level failure.</DL></DD></DL><HR><A NAME="createTimer(java.util.Date, java.io.Serializable)"><!-- --></A><H3>createTimer</H3><PRE>public <A HREF="../../javax/ejb/Timer.html" title="interface in javax.ejb">Timer</A> <B>createTimer</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Date.html" title="class or interface in java.util">Date</A> expiration, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/Serializable.html" title="class or interface in java.io">Serializable</A> info) 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>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A>, <A HREF="../../javax/ejb/EJBException.html" title="class in javax.ejb">EJBException</A></PRE><DL><DD>Create a single-action timer that expires at a given point in time.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>expiration</CODE> - The point in time at which the timer must expire.<DD><CODE>info</CODE> - Application information to be delivered along with the timer expiration notification. This can be null.<DT><B>Returns:</B><DD>The newly created Timer.<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> - If expiration is null, or expiration.getTime() is negative.<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - If this method is invoked while the instance is in a state that does not allow access to this method.<DD><CODE><A HREF="../../javax/ejb/EJBException.html" title="class in javax.ejb">EJBException</A></CODE> - If this method could not complete due to a system-level failure.</DL></DD></DL><HR><A NAME="createTimer(java.util.Date, long, java.io.Serializable)"><!-- --></A><H3>createTimer</H3><PRE>public <A HREF="../../javax/ejb/Timer.html" title="interface in javax.ejb">Timer</A> <B>createTimer</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Date.html" title="class or interface in java.util">Date</A> initialExpiration, long intervalDuration, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/Serializable.html" title="class or interface in java.io">Serializable</A> info) 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>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A>, <A HREF="../../javax/ejb/EJBException.html" title="class in javax.ejb">EJBException</A></PRE><DL><DD>Create an interval timer whose first expiration occurs at a given point in time and whose subsequent expirations occur after a specified interval.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>initialExpiration</CODE> - The point in time at which the first timer expiration must occur.<DD><CODE>intervalDuration</CODE> - The number of milliseconds that must elapse between timer expiration notifications. Expiration notifications are scheduled relative to the time of the first expiration. If expiration is delayed(e.g. due to the interleaving of other method calls on the bean) two or more expiration notifications may occur in close succession to "catch up".<DD><CODE>info</CODE> - Application information to be delivered along with the timer expiration. This can be null.<DT><B>Returns:</B><DD>The newly created Timer.<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> - If initialExpiration is null, or initialExpiration.getTime() is negative, or intervalDuration is negative.<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - If this method is invoked while the instance is in a state that does not allow access to this method.<DD><CODE><A HREF="../../javax/ejb/EJBException.html" title="class in javax.ejb">EJBException</A></CODE> - If this method could not complete due to a system-level failure.</DL></DD></DL><HR><A NAME="getTimers()"><!-- --></A><H3>getTimers</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A> <B>getTimers</B>() throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A>, <A HREF="../../javax/ejb/EJBException.html" title="class in javax.ejb">EJBException</A></PRE><DL><DD>Get all the active timers associated with this bean.<P><DD><DL><DT><B>Returns:</B><DD>A collection of javax.ejb.Timer objects.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - If this method is invoked while the instance is in a state that does not allow access to this method.<DD><CODE><A HREF="../../javax/ejb/EJBException.html" title="class in javax.ejb">EJBException</A></CODE> - If this method could not complete due to a system-level failure.</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=3 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> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Ent. Ed. v1.4</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../javax/ejb/TimerHandle.html" title="interface in javax.ejb"><B>PREV CLASS</B></A> NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="TimerService.html" target="_top"><B>NO FRAMES</B></A> <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: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><font size="-1"><a href="http://java.sun.com/webapps/bugreport">Submit a bug or feature</a> <p>Copyright 2003 Sun Microsystems, Inc. All rights reserved.</font></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -