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

📄 activity.html

📁 文件来自swarm.org
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Tue Nov 30 14:11:20 MST 2004 --><TITLE>Swarm 2.2 Reference Guide: Interface  Activity</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT ID="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 ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../swarm/activity/ActivationOrderS.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../swarm/activity/ActivityC.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="Activity.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&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><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">swarm.activity</FONT><BR>Interface  Activity</H2><DL><DT><B>All Known Subinterfaces:</B> <DD><A HREF="../../swarm/activity/ForEachActivity.html">ForEachActivity</A>, <A HREF="../../swarm/activity/ScheduleActivity.html">ScheduleActivity</A>, <A HREF="../../swarm/activity/SwarmActivity.html">SwarmActivity</A></DD></DL><HR><DL><DT>public interface <B>Activity</B><DT>extends <A HREF="../../swarm/defobj/DefinedObject.html">DefinedObject</A>, <A HREF="../../swarm/defobj/DefinedObjectS.html">DefinedObjectS</A>, <A HREF="../../swarm/defobj/Drop.html">Drop</A>, <A HREF="../../swarm/defobj/DropS.html">DropS</A></DL><P><strong> A level of processing by the interpreter of an action type.</strong>.A object of type Activity implements the processing of actions within an action plan.  Each subtype of action plan has a corresponding subtype of Activity that implements processing of its respective type of plan. The Activity types are part of the virtual processing machinery of an action plan interpreter.  All the important elements of this machinery, including their current state of processing, are exposed to aid in development of general-purpose tools such as debuggers.  Except for applications that need to create and run their own reflective activities, direct use of activity types by a modeling application should be rare. A new activity object is created by each activateIn: message sent to an action type.  activateIn: initializes a new activity object and prepares it for processing, but does not itself execute any actions. Subsequent messages, such as run, must be used to initiate processing within an activity.  If an activity is activated to run under a swarm context, the owning swarm itself controls all processing within the subactivity. An Activity type holds a tree of currently running, or a potentially runnable, subactivities.  Each activity object represents a state of processing within a single action plan.  The structure is a tree because multiple activities could be running or eligible to run at the same time.  This occurs whenever two activities are specified as concurrent, either because are being performed by concurrent actions in some other plan, or because they were started for autonomous execution under the same swarm.  When parallel processing machinery is present, each activity could also be advancing its own state independent of those of any other activity. The current implementation supports only a single serial processor. Under serial execution, only one activity may be active at one time. This means that the current state of processing may be represented by a single stack of current activities that traces a path to a single leaf of the runnable activity tree.  When running in serial mode, messages are available to obtain the currently running leaf activity or useful context information such as the current time available from it.<P><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../swarm/activity/Action.html">Action</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/activity/Activity.html#getAction()">getAction</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get action containing parameter bindings for the local activity.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.lang.Object</CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/activity/Activity.html#getActionType()">getActionType</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get action type of action being performed by activity.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../swarm/activity/Activity.html">Activity</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/activity/Activity.html#getControllingActivity()">getControllingActivity</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return activity that issued current run request on top-level activity.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../swarm/activity/Activity.html">Activity</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/activity/Activity.html#getCurrentSubactivity()">getCurrentSubactivity</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get running subactivity or next subactivity to run.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../swarm/defobj/Symbol.html">Symbol</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/activity/Activity.html#getHoldType()">getHoldType</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The getHoldType returns a code for the particular hold constraint under which an activity is currently holding (HoldStart or HoldEnd).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../swarm/activity/Activity.html">Activity</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/activity/Activity.html#getOwnerActivity()">getOwnerActivity</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return activity under which this activity is running.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../swarm/activity/ScheduleActivity.html">ScheduleActivity</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/activity/Activity.html#getScheduleActivity()">getScheduleActivity</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return most immediately containing Schedule activity.</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="../../swarm/activity/Activity.html#getSerialMode()">getSerialMode</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return indicator for serial execution mode.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../swarm/defobj/Symbol.html">Symbol</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/activity/Activity.html#getStatus()">getStatus</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The getStatus message returns one of the following codes for the current run status of a particular activity: Initialized, Running, Stopped, Holding, Released, Terminated, Completed.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.lang.Object</CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/activity/Activity.html#getSubactivities()">getSubactivities</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return set of subactivities pending to be run.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../swarm/activity/SwarmActivity.html">SwarmActivity</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/activity/Activity.html#getSwarmActivity()">getSwarmActivity</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return most immediately containing Swarm activity.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../swarm/activity/Activity.html">Activity</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/activity/Activity.html#getTopLevelActivity()">getTopLevelActivity</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return top of activity tree running the local activity.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../swarm/defobj/Symbol.html">Symbol</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/activity/Activity.html#nextAction()">nextAction</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The next executes actions within a single compound action while skipping over all processing of any complete action plans executed by those actions.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../swarm/defobj/Symbol.html">Symbol</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/activity/Activity.html#run()">run</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The run message continue processing of an activity from any state in which its execution has been suspended.</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="../../swarm/activity/Activity.html#setOwnerActivity(java.lang.Object)">setOwnerActivity</A></B>(java.lang.Object&nbsp;ownerActivity)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Change owner from one swarm activity to another.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.lang.Object</CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/activity/Activity.html#setSerialMode(boolean)">setSerialMode</A></B>(boolean&nbsp;serialMode)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set serial execution mode.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../swarm/defobj/Symbol.html">Symbol</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/activity/Activity.html#stepAction()">stepAction</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The step message executes a single action within a tree of activities.</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="../../swarm/activity/Activity.html#stop()">stop</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The stop message causes the a currently running tree of activities to stop further processing and return a Stopped status.</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="../../swarm/activity/Activity.html#terminate()">terminate</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Terminate also stops a running tree of activities, but sets all activities within the tree to a status of Completed whenever the tree is next run.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_swarm.defobj.DefinedObject"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface swarm.defobj.<A HREF="../../swarm/defobj/DefinedObject.html">DefinedObject</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../swarm/defobj/DefinedObject.html#compare(java.lang.Object)">compare</A>, <A HREF="../../swarm/defobj/DefinedObject.html#describe(java.lang.Object)">describe</A>, <A HREF="../../swarm/defobj/DefinedObject.html#describeID(java.lang.Object)">describeID</A>, <A HREF="../../swarm/defobj/DefinedObject.html#getDisplayName()">getDisplayName</A>, <A HREF="../../swarm/defobj/DefinedObject.html#getTypeName()">getTypeName</A>, <A HREF="../../swarm/defobj/DefinedObject.html#getZone()">getZone</A>, <A HREF="../../swarm/defobj/DefinedObject.html#perform(swarm.Selector)">perform</A>, <A HREF="../../swarm/defobj/DefinedObject.html#perform$with(swarm.Selector, java.lang.Object)">perform$with</A>, <A HREF="../../swarm/defobj/DefinedObject.html#perform$with$with(swarm.Selector, java.lang.Object, java.lang.Object)">perform$with$with</A>, <A HREF="../../swarm/defobj/DefinedObject.html#perform$with$with$with(swarm.Selector, java.lang.Object, java.lang.Object, java.lang.Object)">perform$with$with$with</A>, <A HREF="../../swarm/defobj/DefinedObject.html#respondsTo(swarm.Selector)">respondsTo</A>, <A HREF="../../swarm/defobj/DefinedObject.html#setDisplayName(java.lang.String)">setDisplayName</A>, <A HREF="../../swarm/defobj/DefinedObject.html#xfprint()">xfprint</A>, <A HREF="../../swarm/defobj/DefinedObject.html#xfprintid()">xfprintid</A>, <A HREF="../../swarm/defobj/DefinedObject.html#xprint()">xprint</A>, <A HREF="../../swarm/defobj/DefinedObject.html#xprintid()">xprintid</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_swarm.defobj.Drop"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface swarm.defobj.<A HREF="../../swarm/defobj/Drop.html">Drop</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../swarm/defobj/Drop.html#drop()">drop</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_swarm.defobj.GetName"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">

⌨️ 快捷键说明

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