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

Constructor Index

 o OPInterpreter()

Method Index

 o interpretLanguage(KQMLmessage, Agent, Language)
This function must not be called.
 o interpretMessage(KQMLmessage, Agent)
This function is called when an OPAgent receives a KQML message with the :ontology OPlan.
 o tellAction(KQMLmessage, OPAgent)
This function gets called when this OPInterpreter receives a tell message.

Constructors

 o OPInterpreter
 public OPInterpreter()

Methods

 o 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:

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
 o 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
 o 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:


All Packages  Class Hierarchy  This Package  Previous  Next  Index