Jadex 0.96-beta1

jadex.runtime
Interface IExternalAccess

All Superinterfaces:
ICapability, IElement

public interface IExternalAccess
extends ICapability

The interface for external threads.


Method Summary
 IGoal createGoal(String type)
          Create a goal from a template goal.
 IInternalEvent createInternalEvent(String type)
          Create a new intenal event.
 IInternalEvent createInternalEvent(String type, Object content)
          Deprecated. Convenience method for easy conversion to new explicit internal events. Will be removed in later releases.
 IMessageEvent createMessageEvent(String type)
          Create a new message event.
 void dispatchInternalEvent(IInternalEvent event)
          Dispatch an internal event.
 void dispatchTopLevelGoal(IGoal goal)
          Dispatch a new top-level goal.
 void dispatchTopLevelGoalAndWait(IGoal goal)
          Dispatch a top level goal and wait for the result.
 void dispatchTopLevelGoalAndWait(IGoal goal, long timeout)
          Dispatch a top level goal and wait for the result.
 IFilter sendMessage(IMessageEvent me)
          Send a message after some delay.
 IMessageEvent sendMessageAndWait(IMessageEvent me)
          Send a message and wait for the answer.
 IMessageEvent sendMessageAndWait(IMessageEvent me, long timeout)
          Send a message and wait for the answer.
 void waitFor(long duration)
          Wait for a some time.
 void waitForAgentTerminating()
          Wait for the agent to terminate.
 void waitForAgentTerminating(long timeout)
          Wait for the agent to terminate.
 Object waitForBeliefChange(String type)
          Wait for a belief change.
 Object waitForBeliefChange(String type, long timeout)
          Wait for a belief change.
 void waitForBeliefSetChange(String type)
          Wait for a belief set change.
 void waitForBeliefSetChange(String type, long timeout)
          Wait for a belief set change.
 void waitForCondition(ICondition condition)
          Wait for a condition to be satisfied.
 void waitForCondition(ICondition condition, long timeout)
          Wait for a condition or until the timeout occurs.
 void waitForCondition(String condition)
          Wait for a condition to be satisfied.
 void waitForCondition(String condition, long timeout)
          Wait for a condition to be satisfied.
 Object waitForFactAdded(String type)
          Wait for a belief set change.
 Object waitForFactAdded(String type, long timeout)
          Wait for a belief set change.
 Object waitForFactAddedOrRemoved(String type)
          Wait for a belief set change.
 Object waitForFactAddedOrRemoved(String type, long timeout)
          Wait for a belief set change.
 Object waitForFactRemoved(String type)
          Wait for a belief set change.
 Object waitForFactRemoved(String type, long timeout)
          Wait for a belief set change.
 void waitForGoal(String type)
          Wait for a goal.
 void waitForGoal(String type, long timeout)
          Wait for a goal.
 IInternalEvent waitForInternalEvent(String type)
          Wait for an internal event.
 IInternalEvent waitForInternalEvent(String type, long timeout)
          Wait for an internal event.
 IMessageEvent waitForMessageEvent(String type)
          Wait for a message event.
 IMessageEvent waitForMessageEvent(String type, long timeout)
          Wait for a message event.
 IMessageEvent waitForReply(IMessageEvent msgevent)
          Wait for a message.
 IMessageEvent waitForReply(IMessageEvent msgevent, long timeout)
          Wait for a message.
 
Methods inherited from interface jadex.runtime.ICapability
addAgentListener, addSubcapability, deregisterSubcapability, getAgentIdentifier, getAgentName, getBeliefbase, getEventbase, getExpressionbase, getExternalAccess, getGoalbase, getInitialStateName, getLogger, getPlanbase, getPlatformAgent, getPlatformType, getPropertybase, killAgent, registerSubcapability, removeAgentListener, removeSubcapability
 
Methods inherited from interface jadex.runtime.IElement
getModelElement, getName
 

Method Detail

dispatchTopLevelGoal

void dispatchTopLevelGoal(IGoal goal)
Dispatch a new top-level goal.

Parameters:
goal - The new goal. Note: plan step is interrupted after call.

createGoal

IGoal createGoal(String type)
Create a goal from a template goal. To be processed, the goal has to be dispatched as subgoal or adopted as top-level goal.

Parameters:
type - The template goal name as specified in the ADF.
Returns:
The created goal.

sendMessage

IFilter sendMessage(IMessageEvent me)
Send a message after some delay.

Parameters:
me - The message event.
Returns:
The filter to wait for an answer.

dispatchInternalEvent

void dispatchInternalEvent(IInternalEvent event)
Dispatch an internal event.

Parameters:
event - The event. Note: plan step is interrupted after call.

createMessageEvent

IMessageEvent createMessageEvent(String type)
Create a new message event.

Returns:
The new message event.

createInternalEvent

IInternalEvent createInternalEvent(String type)
Create a new intenal event.

Returns:
The new intenal event.

createInternalEvent

IInternalEvent createInternalEvent(String type,
                                   Object content)
Deprecated. Convenience method for easy conversion to new explicit internal events. Will be removed in later releases.

Create a new intenal event.

Returns:
The new intenal event.

waitFor

void waitFor(long duration)
Wait for a some time.

Parameters:
duration - The duration.

waitForCondition

void waitForCondition(ICondition condition)
Wait for a condition to be satisfied.

Parameters:
condition - The condition.

waitForCondition

void waitForCondition(ICondition condition,
                      long timeout)
Wait for a condition or until the timeout occurs.

Parameters:
condition - The condition.
timeout - The timeout.

waitForCondition

void waitForCondition(String condition)
Wait for a condition to be satisfied.

Parameters:
condition - The condition.

waitForCondition

void waitForCondition(String condition,
                      long timeout)
Wait for a condition to be satisfied.

Parameters:
condition - The condition.

waitForInternalEvent

IInternalEvent waitForInternalEvent(String type)
Wait for an internal event.

Parameters:
type - The internal event type.

waitForInternalEvent

IInternalEvent waitForInternalEvent(String type,
                                    long timeout)
Wait for an internal event.

Parameters:
type - The internal event type.
timeout - The timeout.

sendMessageAndWait

IMessageEvent sendMessageAndWait(IMessageEvent me)
Send a message and wait for the answer.

Parameters:
me - The message event.
Returns:
The result event.

sendMessageAndWait

IMessageEvent sendMessageAndWait(IMessageEvent me,
                                 long timeout)
Send a message and wait for the answer. Adds a reply-with entry if not present, for tracking the conversation.

Parameters:
me - The message event.
timeout - The timeout.
Returns:
The result event.

waitForMessageEvent

IMessageEvent waitForMessageEvent(String type)
Wait for a message event.

Parameters:
type - The message event type.

waitForMessageEvent

IMessageEvent waitForMessageEvent(String type,
                                  long timeout)
Wait for a message event.

Parameters:
type - The message event type.
timeout - The timeout.

waitForReply

IMessageEvent waitForReply(IMessageEvent msgevent)
Wait for a message.

Parameters:
msgevent - The message event.

waitForReply

IMessageEvent waitForReply(IMessageEvent msgevent,
                           long timeout)
Wait for a message.

Parameters:
msgevent - The message event.

waitForGoal

void waitForGoal(String type)
Wait for a goal.

Parameters:
type - The goal type.

waitForGoal

void waitForGoal(String type,
                 long timeout)
Wait for a goal.

Parameters:
type - The goal type.
timeout - The timeout.

waitForBeliefChange

Object waitForBeliefChange(String type)
Wait for a belief change.

Parameters:
type - The internal event type.
Returns:
The new fact.

waitForBeliefChange

Object waitForBeliefChange(String type,
                           long timeout)
Wait for a belief change.

Parameters:
type - The belief type.
timeout - The timeout.

waitForBeliefSetChange

void waitForBeliefSetChange(String type)
Wait for a belief set change.

Parameters:
type - The belief set type.

waitForBeliefSetChange

void waitForBeliefSetChange(String type,
                            long timeout)
Wait for a belief set change.

Parameters:
type - The belief set type.

waitForFactAddedOrRemoved

Object waitForFactAddedOrRemoved(String type)
Wait for a belief set change.

Parameters:
type - The belief set type.

waitForFactAddedOrRemoved

Object waitForFactAddedOrRemoved(String type,
                                 long timeout)
Wait for a belief set change.

Parameters:
type - The belief set type.
timeout - The timeout. todo: returns a condition triggered event? or new BeliefChanged event?

waitForFactAdded

Object waitForFactAdded(String type)
Wait for a belief set change.

Parameters:
type - The belief set type.
Returns:
The fact that was added.

waitForFactAdded

Object waitForFactAdded(String type,
                        long timeout)
Wait for a belief set change.

Parameters:
type - The belief set type.
timeout - The timeout.
Returns:
The fact that was added.

waitForFactRemoved

Object waitForFactRemoved(String type)
Wait for a belief set change.

Parameters:
type - The belief set type.
Returns:
The fact that was added.

waitForFactRemoved

Object waitForFactRemoved(String type,
                          long timeout)
Wait for a belief set change.

Parameters:
type - The belief set type.
timeout - The timeout.
Returns:
The fact that was added.

dispatchTopLevelGoalAndWait

void dispatchTopLevelGoalAndWait(IGoal goal)
Dispatch a top level goal and wait for the result.

Parameters:
goal - The goal.

dispatchTopLevelGoalAndWait

void dispatchTopLevelGoalAndWait(IGoal goal,
                                 long timeout)
Dispatch a top level goal and wait for the result.

Parameters:
goal - The goal.

waitForAgentTerminating

void waitForAgentTerminating()
Wait for the agent to terminate.


waitForAgentTerminating

void waitForAgentTerminating(long timeout)
Wait for the agent to terminate.


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.