Intention.html
Home
/
bdi-jade /
doc /
bdi4jade /
core /
Intention.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_25) on Thu Jan 09 01:28:38 BRST 2014 -->
<title>Intention</title>
<meta name="date" content="2014-01-09">
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Intention";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Intention.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-files/index-1.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../bdi4jade/core/Capability.html" title="class in bdi4jade.core"><span class="strong">Prev Class</span></a></li>
<li><a href="../../bdi4jade/core/PlanLibrary.html" title="class in bdi4jade.core"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?bdi4jade/core/Intention.html" target="_top">Frames</a></li>
<li><a href="Intention.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">bdi4jade.core</div>
<h2 title="Class Intention" class="title">Class Intention</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>bdi4jade.core.Intention</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="strong">Intention</span>
extends java.lang.Object</pre>
<div class="block">This class represents the intention abstraction from the BDI model. It
represents a goal that the agent is committed to achieve. It has the
associated goal and tries to execute plans to achieve it. It keeps a list of
the executed plans, and after using all plans unsuccessfully, the goal is
considered unachievable. When a plan fails, the BDI-interpreter cycle may
invoke the <a href="../../bdi4jade/core/Intention.html#tryToAchive()"><code>tryToAchive()</code></a> method again, so the intention tries
another plan. During its execution, the intention can be set to no longer
desired.</div>
<dl><dt><span class="strong">Author:</span></dt>
<dd>ingrid</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../bdi4jade/core/Intention.html#Intention(bdi4jade.goal.Goal, bdi4jade.core.BDIAgent)">Intention</a></strong>(<a href="../../bdi4jade/goal/Goal.html" title="interface in bdi4jade.goal">Goal</a> goal,
<a href="../../bdi4jade/core/BDIAgent.html" title="class in bdi4jade.core">BDIAgent</a> bdiAgent)</code>
<div class="block">Creates a new intention.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../bdi4jade/core/Intention.html#Intention(bdi4jade.goal.Goal, bdi4jade.core.BDIAgent, bdi4jade.core.Capability)">Intention</a></strong>(<a href="../../bdi4jade/goal/Goal.html" title="interface in bdi4jade.goal">Goal</a> goal,
<a href="../../bdi4jade/core/BDIAgent.html" title="class in bdi4jade.core">BDIAgent</a> bdiAgent,
<a href="../../bdi4jade/core/Capability.html" title="class in bdi4jade.core">Capability</a> owner)</code>
<div class="block">Creates a new intention.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../bdi4jade/core/Intention.html#addGoalListener(bdi4jade.event.GoalListener)">addGoalListener</a></strong>(<a href="../../bdi4jade/event/GoalListener.html" title="interface in bdi4jade.event">GoalListener</a> goalListener)</code>
<div class="block">Adds a listener to be notified when the given has achieve its end state.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../bdi4jade/core/Intention.html#doWait()">doWait</a></strong>()</code>
<div class="block">Sets this intention to the <a href="../../bdi4jade/goal/GoalStatus.html#WAITING"><code>GoalStatus.WAITING</code></a> status.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../bdi4jade/core/Intention.html#fireGoalFinishedEvent()">fireGoalFinishedEvent</a></strong>()</code>
<div class="block">Fires a goal event when a goal has achieved its end state.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../bdi4jade/goal/Goal.html" title="interface in bdi4jade.goal">Goal</a></code></td>
<td class="colLast"><code><strong><a href="../../bdi4jade/core/Intention.html#getGoal()">getGoal</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.util.List<<a href="../../bdi4jade/event/GoalListener.html" title="interface in bdi4jade.event">GoalListener</a>></code></td>
<td class="colLast"><code><strong><a href="../../bdi4jade/core/Intention.html#getGoalListeners()">getGoalListeners</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../bdi4jade/core/BDIAgent.html" title="class in bdi4jade.core">BDIAgent</a></code></td>
<td class="colLast"><code><strong><a href="../../bdi4jade/core/Intention.html#getMyAgent()">getMyAgent</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../bdi4jade/goal/GoalStatus.html" title="enum in bdi4jade.goal">GoalStatus</a></code></td>
<td class="colLast"><code><strong><a href="../../bdi4jade/core/Intention.html#getStatus()">getStatus</a></strong>()</code>
<div class="block">Returns the current goal status that this capability is committed to
achieve.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../bdi4jade/core/Intention.html#noLongerDesire()">noLongerDesire</a></strong>()</code>
<div class="block">Sets this intention as no longer desired.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../bdi4jade/core/Intention.html#removeGoalListener(bdi4jade.event.GoalListener)">removeGoalListener</a></strong>(<a href="../../bdi4jade/event/GoalListener.html" title="interface in bdi4jade.event">GoalListener</a> goalListener)</code>
<div class="block">Removes a goal listener to not be notified about the goal achievement
anymore.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../bdi4jade/core/Intention.html#tryToAchive()">tryToAchive</a></strong>()</code>
<div class="block">Makes this intention starts to try to achieve the goal.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.Object</h3>
<code>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="Intention(bdi4jade.goal.Goal, bdi4jade.core.BDIAgent)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Intention</h4>
<pre>public Intention(<a href="../../bdi4jade/goal/Goal.html" title="interface in bdi4jade.goal">Goal</a> goal,
<a href="../../bdi4jade/core/BDIAgent.html" title="class in bdi4jade.core">BDIAgent</a> bdiAgent)</pre>
<div class="block">Creates a new intention. It is associated with an agent and the goal that
it is committed to achieve.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>goal</code> - the goal to be achieved.</dd><dd><code>bdiAgent</code> - the bdiAgent associated with this intention.</dd></dl>
</li>
</ul>
<a name="Intention(bdi4jade.goal.Goal, bdi4jade.core.BDIAgent, bdi4jade.core.Capability)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Intention</h4>
<pre>public Intention(<a href="../../bdi4jade/goal/Goal.html" title="interface in bdi4jade.goal">Goal</a> goal,
<a href="../../bdi4jade/core/BDIAgent.html" title="class in bdi4jade.core">BDIAgent</a> bdiAgent,
<a href="../../bdi4jade/core/Capability.html" title="class in bdi4jade.core">Capability</a> owner)</pre>
<div class="block">Creates a new intention. It is associated with an agent and the goal that
it is committed to achieve. It also receives a <a href="../../bdi4jade/core/Capability.html" title="class in bdi4jade.core"><code>Capability</code></a> as
parameter indicating the owner of the goal (dispatched the goal).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>goal</code> - the goal to be achieved.</dd><dd><code>bdiAgent</code> - the bdiAgent associated with this intention.</dd><dd><code>owner</code> - the Capability that is owner of the goal.</dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="addGoalListener(bdi4jade.event.GoalListener)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addGoalListener</h4>
<pre>public void addGoalListener(<a href="../../bdi4jade/event/GoalListener.html" title="interface in bdi4jade.event">GoalListener</a> goalListener)</pre>
<div class="block">Adds a listener to be notified when the given has achieve its end state.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>goalListener</code> - the listener to be notified.</dd></dl>
</li>
</ul>
<a name="doWait()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>doWait</h4>
<pre>public void doWait()</pre>
<div class="block">Sets this intention to the <a href="../../bdi4jade/goal/GoalStatus.html#WAITING"><code>GoalStatus.WAITING</code></a> status. It may come
from the <a href="../../bdi4jade/goal/GoalStatus.html#PLAN_FAILED"><code>GoalStatus.PLAN_FAILED</code></a> or
<a href="../../bdi4jade/goal/GoalStatus.html#TRYING_TO_ACHIEVE"><code>GoalStatus.TRYING_TO_ACHIEVE</code></a> states.</div>
</li>
</ul>
<a name="fireGoalFinishedEvent()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fireGoalFinishedEvent</h4>
<pre>public void fireGoalFinishedEvent()</pre>
<div class="block">Fires a goal event when a goal has achieved its end state.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../bdi4jade/goal/GoalStatus.html" title="enum in bdi4jade.goal"><code>GoalStatus</code></a></dd></dl>
</li>
</ul>
<a name="getGoal()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getGoal</h4>
<pre>public <a href="../../bdi4jade/goal/Goal.html" title="interface in bdi4jade.goal">Goal</a> getGoal()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>the goal</dd></dl>
</li>
</ul>
<a name="getGoalListeners()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getGoalListeners</h4>
<pre>public java.util.List<<a href="../../bdi4jade/event/GoalListener.html" title="interface in bdi4jade.event">GoalListener</a>> getGoalListeners()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>the goalListeners</dd></dl>
</li>
</ul>
<a name="getMyAgent()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMyAgent</h4>
<pre>public <a href="../../bdi4jade/core/BDIAgent.html" title="class in bdi4jade.core">BDIAgent</a> getMyAgent()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>the myAgent</dd></dl>
</li>
</ul>
<a name="getStatus()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStatus</h4>
<pre>public <a href="../../bdi4jade/goal/GoalStatus.html" title="enum in bdi4jade.goal">GoalStatus</a> getStatus()</pre>
<div class="block">Returns the current goal status that this capability is committed to
achieve.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the current goal status.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../bdi4jade/goal/GoalStatus.html" title="enum in bdi4jade.goal"><code>GoalStatus</code></a></dd></dl>
</li>
</ul>
<a name="noLongerDesire()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>noLongerDesire</h4>
<pre>public void noLongerDesire()</pre>
<div class="block">Sets this intention as no longer desired. It stops the current plan
execution. It changes the goal status from <a href="../../bdi4jade/goal/GoalStatus.html#WAITING"><code>GoalStatus.WAITING</code></a>,
<a href="../../bdi4jade/goal/GoalStatus.html#PLAN_FAILED"><code>GoalStatus.PLAN_FAILED</code></a> or <a href="../../bdi4jade/goal/GoalStatus.html#TRYING_TO_ACHIEVE"><code>GoalStatus.TRYING_TO_ACHIEVE</code></a> to
<a href="../../bdi4jade/goal/GoalStatus.html#NO_LONGER_DESIRED"><code>GoalStatus.NO_LONGER_DESIRED</code></a>.</div>
</li>
</ul>
<a name="removeGoalListener(bdi4jade.event.GoalListener)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeGoalListener</h4>
<pre>public void removeGoalListener(<a href="../../bdi4jade/event/GoalListener.html" title="interface in bdi4jade.event">GoalListener</a> goalListener)</pre>
<div class="block">Removes a goal listener to not be notified about the goal achievement
anymore.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>goalListener</code> - the goal listener to be removed.</dd></dl>
</li>
</ul>
<a name="tryToAchive()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>tryToAchive</h4>
<pre>public void tryToAchive()</pre>
<div class="block">Makes this intention starts to try to achieve the goal. It changes the
goal status from <a href="../../bdi4jade/goal/GoalStatus.html#WAITING"><code>GoalStatus.WAITING</code></a> or
<a href="../../bdi4jade/goal/GoalStatus.html#PLAN_FAILED"><code>GoalStatus.PLAN_FAILED</code></a> to <a href="../../bdi4jade/goal/GoalStatus.html#TRYING_TO_ACHIEVE"><code>GoalStatus.TRYING_TO_ACHIEVE</code></a>.</div>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Intention.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-files/index-1.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../bdi4jade/core/Capability.html" title="class in bdi4jade.core"><span class="strong">Prev Class</span></a></li>
<li><a href="../../bdi4jade/core/PlanLibrary.html" title="class in bdi4jade.core"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?bdi4jade/core/Intention.html" target="_top">Frames</a></li>
<li><a href="Intention.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>