All Packages Class Hierarchy This Package Previous Next Index
Class JavaAgent.oplan.OPInterpreter
java.lang.Object
|
+----JavaAgent.resource.Interpreter
|
+----JavaAgent.oplan.OPInterpreter
- public class OPInterpreter
- extends Interpreter
This Interpreter is the agent interface to an O-Plan process. It also
acts as the controller of O-Plan that manages all necessary information.
It accepts KQML messages with several performatives. The content language
for any such message must be given as OP-TAIL, the O-Plan Task Assignment
Interface Language. There is no according class for this language which
is why the interpretLanguage method of this Interpreter must not
be called.
- See Also:
- KQMLmessage
-
OPInterpreter()
-
-
interpretLanguage(KQMLmessage, Agent, Language)
- This function must not be called.
-
interpretMessage(KQMLmessage, Agent)
- This function is called when an OPAgent receives a KQML message
with the :ontology OPlan.
-
tellAction(KQMLmessage, OPAgent)
- This function gets called when this OPInterpreter receives a
tell message.
OPInterpreter
public OPInterpreter()
interpretMessage
public void interpretMessage(KQMLmessage message,
Agent receiver) throws InterpretationException
- This function is called when an OPAgent receives a KQML message
with the :ontology OPlan. The content :language
must be OP-TAIL at present. The following performatives are currently
accepted:
- tell calls tellAction(...)
- Parameters:
- message - the KQMLmessage to be interpreted here
- receiver - the Agent to which this OPInterpreter belongs and which
has received the message
- Throws: InterpretationException
- An exception will occur if this
OPInterpreter fails to process this message for some reason, e.g. if
the content language is not OP-TAIL.
- Overrides:
- interpretMessage in class Interpreter
interpretLanguage
protected void interpretLanguage(KQMLmessage message,
Agent receiver,
Language language) throws InterpretationException
- This function must not be called. All messages to O-Plan should be
processed by interpretMessage above. A call to this function
will result in an immediate InterpretationException.
- Overrides:
- interpretLanguage in class Interpreter
tellAction
protected void tellAction(KQMLmessage message,
OPAgent receiver) throws InterpretationException
- This function gets called when this OPInterpreter receives a
tell message. The content of the message will be passed on to
O-Plan (mostly) as is. Unfortunately the KQMLmessage parser may delete
some of the spaces in the message which might lead to problems.
Depending on the content of the message various other
actions might take place too:
- (:domain "file")
where file is a filename including any path information
but excluding the .tf extesion.The domain can only be set
by the init-file.
Before this message is sent to O-Plan a :init message will
be created to initialize O-Plan. After the reply from O-Plan has been
received the content of the message will be sent to O-Plan setting
the domain. Finally, this message will also cause the OPAgent to
advertize its capabilitites to the broker.
All Packages Class Hierarchy This Package Previous Next Index