📄 workmanager.html
字号:
<PRE>static final long <B>INDEFINITE</B></PRE><DL><DD>A constant to indicate timeout duration. A maximum timeout value indicates that an action be performed arbitrarily without any time constraint.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#javax.resource.spi.work.WorkManager.INDEFINITE">Constant Field Values</A></DL></DL><HR><A NAME="UNKNOWN"><!-- --></A><H3>UNKNOWN</H3><PRE>static final long <B>UNKNOWN</B></PRE><DL><DD>A constant to indicate an unknown start delay duration or other unknown values.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#javax.resource.spi.work.WorkManager.UNKNOWN">Constant Field Values</A></DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="doWork(javax.resource.spi.work.Work)"><!-- --></A><H3>doWork</H3><PRE>void <B>doWork</B>(<A HREF="../../../../javax/resource/spi/work/Work.html" title="interface in javax.resource.spi.work">Work</A> work) throws <A HREF="../../../../javax/resource/spi/work/WorkException.html" title="class in javax.resource.spi.work">WorkException</A></PRE><DL><DD>Accepts a <code>Work</code> instance for processing. This call blocks until the <code>Work</code> instance completes execution. There is no guarantee on when the accepted <code>Work</code> instance would start execution ie., there is no time constraint to start execution.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>work</CODE> - The unit of work to be done. Could be long or short-lived.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../javax/resource/spi/work/WorkRejectedException.html" title="class in javax.resource.spi.work">WorkRejectedException</A></CODE> - indicates that a <code>Work</code> instance has been rejected from further processing. This can occur due to internal factors.<DD><CODE><A HREF="../../../../javax/resource/spi/work/WorkCompletedException.html" title="class in javax.resource.spi.work">WorkCompletedException</A></CODE> - indicates that a <code>Work</code> instance has completed execution with an exception.<DD><CODE><A HREF="../../../../javax/resource/spi/work/WorkException.html" title="class in javax.resource.spi.work">WorkException</A></CODE></DL></DD></DL><HR><A NAME="doWork(javax.resource.spi.work.Work, long, javax.resource.spi.work.ExecutionContext, javax.resource.spi.work.WorkListener)"><!-- --></A><H3>doWork</H3><PRE>void <B>doWork</B>(<A HREF="../../../../javax/resource/spi/work/Work.html" title="interface in javax.resource.spi.work">Work</A> work, long startTimeout, <A HREF="../../../../javax/resource/spi/work/ExecutionContext.html" title="class in javax.resource.spi.work">ExecutionContext</A> execContext, <A HREF="../../../../javax/resource/spi/work/WorkListener.html" title="interface in javax.resource.spi.work">WorkListener</A> workListener) throws <A HREF="../../../../javax/resource/spi/work/WorkException.html" title="class in javax.resource.spi.work">WorkException</A></PRE><DL><DD>Accepts a <code>Work</code> instance for processing. This call blocks until the <code>Work</code> instance completes execution.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>work</CODE> - The unit of work to be done. Could be long or short-lived.<DD><CODE>startTimeout</CODE> - a time duration (in milliseconds) within which the execution of the <code>Work</code> instance must start. Otherwise, the <code>Work</code> instance is rejected with a <code>WorkRejectedException</code> set to an appropriate error code (<code>WorkRejectedException.TIMED_OUT</code>). Note, this does not offer real-time guarantees.<DD><CODE>execContext</CODE> - an object containing the execution context with which the submitted <code>Work</code> instance must be executed.<DD><CODE>workListener</CODE> - an object which would be notified when the various <code>Work</code> processing events (work accepted, work rejected, work started, work completed) occur.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../javax/resource/spi/work/WorkRejectedException.html" title="class in javax.resource.spi.work">WorkRejectedException</A></CODE> - indicates that a <code>Work</code> instance has been rejected from further processing. This can occur due to internal factors or start timeout expiration.<DD><CODE><A HREF="../../../../javax/resource/spi/work/WorkCompletedException.html" title="class in javax.resource.spi.work">WorkCompletedException</A></CODE> - indicates that a <code>Work</code> instance has completed execution with an exception.<DD><CODE><A HREF="../../../../javax/resource/spi/work/WorkException.html" title="class in javax.resource.spi.work">WorkException</A></CODE></DL></DD></DL><HR><A NAME="startWork(javax.resource.spi.work.Work)"><!-- --></A><H3>startWork</H3><PRE>long <B>startWork</B>(<A HREF="../../../../javax/resource/spi/work/Work.html" title="interface in javax.resource.spi.work">Work</A> work) throws <A HREF="../../../../javax/resource/spi/work/WorkException.html" title="class in javax.resource.spi.work">WorkException</A></PRE><DL><DD>Accepts a <code>Work</code> instance for processing. This call blocks until the <code>Work</code> instance starts execution but not until its completion. There is no guarantee on when the accepted <code>Work</code> instance would start execution ie., there is no time constraint to start execution.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>work</CODE> - The unit of work to be done. Could be long or short-lived.<DT><B>Returns:</B><DD>the time elapsed (in milliseconds) from <code>Work</code> acceptance until start of execution. Note, this does not offer real-time guarantees. It is valid to return -1, if the actual start delay duration is unknown.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../javax/resource/spi/work/WorkRejectedException.html" title="class in javax.resource.spi.work">WorkRejectedException</A></CODE> - indicates that a <code>Work</code> instance has been rejected from further processing. This can occur due to internal factors.<DD><CODE><A HREF="../../../../javax/resource/spi/work/WorkException.html" title="class in javax.resource.spi.work">WorkException</A></CODE></DL></DD></DL><HR><A NAME="startWork(javax.resource.spi.work.Work, long, javax.resource.spi.work.ExecutionContext, javax.resource.spi.work.WorkListener)"><!-- --></A><H3>startWork</H3><PRE>long <B>startWork</B>(<A HREF="../../../../javax/resource/spi/work/Work.html" title="interface in javax.resource.spi.work">Work</A> work, long startTimeout, <A HREF="../../../../javax/resource/spi/work/ExecutionContext.html" title="class in javax.resource.spi.work">ExecutionContext</A> execContext, <A HREF="../../../../javax/resource/spi/work/WorkListener.html" title="interface in javax.resource.spi.work">WorkListener</A> workListener) throws <A HREF="../../../../javax/resource/spi/work/WorkException.html" title="class in javax.resource.spi.work">WorkException</A></PRE><DL><DD>Accepts a <code>Work</code> instance for processing. This call blocks until the <code>Work</code> instance starts execution but not until its completion. There is no guarantee on when the accepted <code>Work</code> instance would start execution ie., there is no time constraint to start execution.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>work</CODE> - The unit of work to be done. Could be long or short-lived.<DD><CODE>startTimeout</CODE> - a time duration (in milliseconds) within which the execution of the <code>Work</code> instance must start. Otherwise, the <code>Work</code> instance is rejected with a <code>WorkRejectedException</code> set to an appropriate error code (<code>WorkRejectedException.TIMED_OUT</code>). Note, this does not offer real-time guarantees.<DD><CODE>execContext</CODE> - an object containing the execution context with which the submitted <code>Work</code> instance must be executed.<DD><CODE>workListener</CODE> - an object which would be notified when the various <code>Work</code> processing events (work accepted, work rejected, work started, work completed) occur.<DT><B>Returns:</B><DD>the time elapsed (in milliseconds) from <code>Work</code> acceptance until start of execution. Note, this does not offer real-time guarantees. It is valid to return -1, if the actual start delay duration is unknown.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../javax/resource/spi/work/WorkRejectedException.html" title="class in javax.resource.spi.work">WorkRejectedException</A></CODE> - indicates that a <code>Work</code> instance has been rejected from further processing. This can occur due to internal factors or start timeout expiration.<DD><CODE><A HREF="../../../../javax/resource/spi/work/WorkException.html" title="class in javax.resource.spi.work">WorkException</A></CODE></DL></DD></DL><HR><A NAME="scheduleWork(javax.resource.spi.work.Work)"><!-- --></A><H3>scheduleWork</H3><PRE>void <B>scheduleWork</B>(<A HREF="../../../../javax/resource/spi/work/Work.html" title="interface in javax.resource.spi.work">Work</A> work) throws <A HREF="../../../../javax/resource/spi/work/WorkException.html" title="class in javax.resource.spi.work">WorkException</A></PRE><DL><DD>Accepts a <code>Work</code> instance for processing. This call does not block and returns immediately once a <code>Work</code> instance has been accepted for processing. There is no guarantee on when the submitted <code>Work</code> instance would start execution ie., there is no time constraint to start execution.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>work</CODE> - The unit of work to be done. Could be long or short-lived.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../javax/resource/spi/work/WorkRejectedException.html" title="class in javax.resource.spi.work">WorkRejectedException</A></CODE> - indicates that a <code>Work</code> instance has been rejected from further processing. This can occur due to internal factors.<DD><CODE><A HREF="../../../../javax/resource/spi/work/WorkException.html" title="class in javax.resource.spi.work">WorkException</A></CODE></DL></DD></DL><HR><A NAME="scheduleWork(javax.resource.spi.work.Work, long, javax.resource.spi.work.ExecutionContext, javax.resource.spi.work.WorkListener)"><!-- --></A><H3>scheduleWork</H3><PRE>void <B>scheduleWork</B>(<A HREF="../../../../javax/resource/spi/work/Work.html" title="interface in javax.resource.spi.work">Work</A> work, long startTimeout, <A HREF="../../../../javax/resource/spi/work/ExecutionContext.html" title="class in javax.resource.spi.work">ExecutionContext</A> execContext, <A HREF="../../../../javax/resource/spi/work/WorkListener.html" title="interface in javax.resource.spi.work">WorkListener</A> workListener) throws <A HREF="../../../../javax/resource/spi/work/WorkException.html" title="class in javax.resource.spi.work">WorkException</A></PRE><DL><DD>Accepts a <code>Work</code> instance for processing. This call does not block and returns immediately once a <code>Work</code> instance has been accepted for processing.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>work</CODE> - The unit of work to be done. Could be long or short-lived.<DD><CODE>startTimeout</CODE> - a time duration (in milliseconds) within which the execution of the <code>Work</code> instance must start. Otherwise, the <code>Work</code> instance is rejected with a <code>WorkRejectedException</code> set to an appropriate error code (<code>WorkRejectedException.TIMED_OUT</code>). Note, this does not offer real-time guarantees.<DD><CODE>execContext</CODE> - an object containing the execution context with which the submitted <code>Work</code> instance must be executed.<DD><CODE>workListener</CODE> - an object which would be notified when the various <code>Work</code> processing events (work accepted, work rejected, work started, work completed) occur.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../javax/resource/spi/work/WorkRejectedException.html" title="class in javax.resource.spi.work">WorkRejectedException</A></CODE> - indicates that a <code>Work</code> instance has been rejected from further processing. This can occur due to internal factors.<DD><CODE><A HREF="../../../../javax/resource/spi/work/WorkException.html" title="class in javax.resource.spi.work">WorkException</A></CODE></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> </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></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../javax/resource/spi/work/WorkListener.html" title="interface in javax.resource.spi.work"><B>PREV CLASS</B></A> <A HREF="../../../../javax/resource/spi/work/WorkRejectedException.html" title="class in javax.resource.spi.work"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?javax/resource/spi/work/WorkManager.html" target="_top"><B>FRAMES</B></A> <A HREF="WorkManager.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 | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | 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 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to <a href="../legal/license.html" target="_top">license terms.</a></font></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -