Jadex 0.96-beta1

jadex.runtime
Interface IGoal

All Superinterfaces:
IElement, IParameterElement

public interface IGoal
extends IParameterElement

The supertype for all goals (concrete and referenced) and all goal types (perform, achieve, get, maintain).


Field Summary
static Object EXCLUDE_NEVER
          Never exclude plan candidates from apl.
static Object EXCLUDE_WHEN_FAILED
          Exclude failed plan candidates from apl.
static Object EXCLUDE_WHEN_SUCCEEDED
          Exclude succeeded plan candidates from apl.
static Object EXCLUDE_WHEN_TRIED
          Exclude tried plan candidates from apl.
static String LIFECYCLESTATE_ACTIVE
          The lifecycle state "active" (adopted and processed or monitored).
static String LIFECYCLESTATE_ADOPTED
          The lifecycle state "adopted" (adopted, but not active).
static String LIFECYCLESTATE_DROPPED
          The lifecycle state "dropped" (deleted).
static String LIFECYCLESTATE_NEW
          The lifecycle state "new" (just created).
static String LIFECYCLESTATE_OPTION
          The lifecycle state "option" (adopted, but not active).
static String LIFECYCLESTATE_SUSPENDED
          The lifecycle state "active" (adopted and processed or monitored).
 
Method Summary
 void addGoalListener(IGoalListener listener, boolean async)
          Add a goal listener.
 void drop()
          Drop this goal.
 Exception getException()
          Get the exception (if any).
 String getExcludeMode()
          Get the exclude mode.
 IFilter getFilter()
          Get the filter to wait for an info event.
 String getLifecycleState()
          Get the lifecycle state.
 long getRecurDelay()
          Get the recur delay expression (if any).
 Object getResult()
          Deprecated.  
 long getRetryDelay()
          Get the retry delay expression (if any).
 String getType()
          Get the goal type.
 boolean isActive()
          Get the activation state.
 boolean isAdopted()
          Check if goal is adopted
 boolean isFailed()
          Test if a goal is failed.
 boolean isFinished()
          Test if a goal is finished.
 boolean isPostToAll()
          Get the post-to-all flag.
 boolean isRandomSelection()
          Get the random selection flag.
 boolean isRecur()
          Get the recur flag.
 boolean isRetry()
          Get the retry flag.
 boolean isSucceeded()
          Test if a goal is succeeded.
 void removeGoalListener(IGoalListener listener)
          Remove a goal listener.
 void setExcludeMode(String exclude)
          Set the exclude mode.
 void setPostToAll(boolean flag)
          Set the post-to-all flag.
 void setRandomSelection(boolean flag)
          Set the random selection flag.
 void setRecur(boolean flag)
          Set the recur flag.
 void setRecurDelay(long delay)
          Set the recur delay (in millis).
 void setResult(Object result)
          Deprecated.  
 void setRetry(boolean flag)
          Set the retry flag.
 void setRetryDelay(long delay)
          Set the retry delay (in millis).
 
Methods inherited from interface jadex.runtime.IParameterElement
getParameter, getParameters, getParameterSet, getParameterSets, hasParameter, hasParameterSet
 
Methods inherited from interface jadex.runtime.IElement
getModelElement, getName
 

Field Detail

EXCLUDE_NEVER

static final Object EXCLUDE_NEVER
Never exclude plan candidates from apl.


EXCLUDE_WHEN_FAILED

static final Object EXCLUDE_WHEN_FAILED
Exclude failed plan candidates from apl.


EXCLUDE_WHEN_SUCCEEDED

static final Object EXCLUDE_WHEN_SUCCEEDED
Exclude succeeded plan candidates from apl.


EXCLUDE_WHEN_TRIED

static final Object EXCLUDE_WHEN_TRIED
Exclude tried plan candidates from apl.


LIFECYCLESTATE_NEW

static final String LIFECYCLESTATE_NEW
The lifecycle state "new" (just created).

See Also:
Constant Field Values

LIFECYCLESTATE_ADOPTED

static final String LIFECYCLESTATE_ADOPTED
The lifecycle state "adopted" (adopted, but not active).

See Also:
Constant Field Values

LIFECYCLESTATE_OPTION

static final String LIFECYCLESTATE_OPTION
The lifecycle state "option" (adopted, but not active).

See Also:
Constant Field Values

LIFECYCLESTATE_ACTIVE

static final String LIFECYCLESTATE_ACTIVE
The lifecycle state "active" (adopted and processed or monitored).

See Also:
Constant Field Values

LIFECYCLESTATE_SUSPENDED

static final String LIFECYCLESTATE_SUSPENDED
The lifecycle state "active" (adopted and processed or monitored).

See Also:
Constant Field Values

LIFECYCLESTATE_DROPPED

static final String LIFECYCLESTATE_DROPPED
The lifecycle state "dropped" (deleted).

See Also:
Constant Field Values
Method Detail

isPostToAll

boolean isPostToAll()
Get the post-to-all flag.


isRandomSelection

boolean isRandomSelection()
Get the random selection flag.


setPostToAll

void setPostToAll(boolean flag)
Set the post-to-all flag.

Parameters:
flag - The post-to-all flag.

setRandomSelection

void setRandomSelection(boolean flag)
Set the random selection flag.

Parameters:
flag - The random selection flag.

isRetry

boolean isRetry()
Get the retry flag.


getRetryDelay

long getRetryDelay()
Get the retry delay expression (if any).


getExcludeMode

String getExcludeMode()
Get the exclude mode.

Returns:
The exclude mode.

isRecur

boolean isRecur()
Get the recur flag.


getRecurDelay

long getRecurDelay()
Get the recur delay expression (if any).


setRetry

void setRetry(boolean flag)
Set the retry flag.

Parameters:
flag - The retry flag.

setRetryDelay

void setRetryDelay(long delay)
Set the retry delay (in millis).

Parameters:
delay - The delay.

setExcludeMode

void setExcludeMode(String exclude)
Set the exclude mode.

Parameters:
exclude - The exclude mode.

setRecur

void setRecur(boolean flag)
Set the recur flag.

Parameters:
flag - The recur flag.

setRecurDelay

void setRecurDelay(long delay)
Set the recur delay (in millis).

Parameters:
delay - The delay.

isActive

boolean isActive()
Get the activation state.

Returns:
True, if the goal is active.

isAdopted

boolean isAdopted()
Check if goal is adopted

Returns:
True, if the goal is adopted.

getLifecycleState

String getLifecycleState()
Get the lifecycle state.

Returns:
The current lifecycle state (e.g. new, active, dropped).

isFinished

boolean isFinished()
Test if a goal is finished.

Returns:
True, if goal is finished.

isSucceeded

boolean isSucceeded()
Test if a goal is succeeded. This has different meanings for the different goal types.

Returns:
True, if goal is succeeded.

isFailed

boolean isFailed()
Test if a goal is failed. This has different meanings for the different goal types.

Returns:
True, if goal has failed.

drop

void drop()
Drop this goal. Causes all associated process goals and subgoals to be dropped.


getType

String getType()
Get the goal type.

Returns:
The goal type.

getException

Exception getException()
Get the exception (if any). When the goal has failed, the exception can be inspected. If more than one plan has been executed for a goal only the last exception will be available.


setResult

void setResult(Object result)
Deprecated. 

Set the result for the goal. This is a convenience method, as the goal result is stored as property.

Parameters:
result - The result.

getResult

Object getResult()
Deprecated. 

Get the result of the goal. This is a convenience method, as the goal result is stored as property.

Returns:
The result value.

getFilter

IFilter getFilter()
Get the filter to wait for an info event.

Returns:
The filter.

addGoalListener

void addGoalListener(IGoalListener listener,
                     boolean async)
Add a goal listener.

Parameters:
listener - The goal listener.
async - True, if the notification should be done on a separate thread.

removeGoalListener

void removeGoalListener(IGoalListener listener)
Remove a goal listener.

Parameters:
listener - The goal listener.

Jadex 0.96-beta1

Submit a bug or feature
For further API reference and developer documentation, see the Jadex User Guide and the Jadex Tutorial. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, and working code examples.

Copyright (C) 2002-2007 Lars Braubach, Alexander Pokahr - University of Hamburg. Use is subject to license terms.