Class JavaAgent.resource.AgentInterpreter
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class JavaAgent.resource.AgentInterpreter

java.lang.Object
   |
   +----JavaAgent.resource.Interpreter
           |
           +----JavaAgent.resource.AgentInterpreter

public class AgentInterpreter
extends Interpreter
Subclass of Interpreter which defines the messages sent between agents regarding addressing and code/file acquisition. Only defined for messages whose syntax is KQML.

The AgentInterpreter has five defined messages with multiple variants of each message type. (each message represents the content field of a top level KQML message):


Copyright (c) 1995, H. Robert Frost, Stanford University. All rights reserved.

Copyright (c) 1996, H. Robert Frost, Enterprise Integration Technologies, Inc. All rights reserved.

RESTRICTED RIGHTS LEGEND: Use, duplication or disclosure by the Government is subject to restrictions as set forth in subparagraph(c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 and in similar clauses in the FAR and NASA FAR supplement.

This software is bound by the terms and conditions listed in the attached LICENSE file.



Constructor Index

 o AgentInterpreter()

Method Index

 o ask_addressAction(KQMLmessage, String, Agent)
Agent wants an address.
 o ask_codeAction(KQMLmessage, String, Agent, Resource)
Request for the location of class code for langauge, Interpreter or class resources.
 o ask_fileAction(KQMLmessage, String, Agent, Resource)
Request for the location of a file.
 o ask_resourceAction(KQMLmessage, String, Agent)
Handles general ask-resource messages.
 o interpretLanguage(KQMLmessage, Agent, Language)
Interpret the Language instance, from the message, for the reciever according to the present Interpreter.
 o invalidate_addressAction(KQMLmessage, Agent)
Remove-address message received.
 o invalidate_addressAgent(KQMLmessage, Agent)
Agent received a invalidate-address message, if the address exists in the local buffer, remove it.
 o invalidate_addressANS(KQMLmessage, ANS)
ANS received an invalidate-address message, if the address exists in the local buffer, remove it, then echo the invalidate-address message to all of the agents which are in the buffer.
 o invalidate_code_fileAction(KQMLmessage, Agent, Resource)
Request to invalidate a current code resource.
 o invalidate_resourceAction(KQMLmessage, Agent)
Handles general invalidate-resource messages.
 o non_uniqueAction(KQMLmessage, Agent)
Agent tried to report a non-unique name, change name to the supplied unique-name, based on the address.
 o tell_addressAction(KQMLmessage, Agent)
Provides the address of an agent.
 o tell_addressAgent(KQMLmessage, Agent)
Agent has received a tell-address message, store the received address in the local buffer.
 o tell_addressANS(KQMLmessage, ANS)
ANS has received the tell_address message, check for unique name, if unique, store in buffer, else send a non-unique-name message back.
 o tell_codeAction(KQMLmessage, Agent, Resource, boolean)
Provides the location of class code for langauge, Interpreter or class resources.
 o tell_fileAction(KQMLmessage, Agent, Resource)
Provides the location of a remote file which must be copied to the local disk.
 o tell_resourceAction(KQMLmessage, Agent)
Handles general tell-resource messages.

Constructors

 o AgentInterpreter
  public AgentInterpreter()

Methods

 o interpretLanguage
  protected void interpretLanguage(KQMLmessage message,
                                   Agent receiver,
                                   Language language) throws InterpretationException
Interpret the Language instance, from the message, for the reciever according to the present Interpreter. Throws a InterpretationException if the language type cannot be handled.
Parameters:
message - Message which needs to be interpreted.
receiver - Agent who received the message.
language - Instance of Language which represents the message contents.
Overrides:
interpretLanguage in class Interpreter
 o tell_resourceAction
  protected void tell_resourceAction(KQMLmessage message,
                                     Agent parent)
Handles general tell-resource messages.
 o ask_resourceAction
  protected void ask_resourceAction(KQMLmessage message,
                                    String sender,
                                    Agent parent)
Handles general ask-resource messages.
 o invalidate_resourceAction
  protected void invalidate_resourceAction(KQMLmessage message,
                                           Agent parent)
Handles general invalidate-resource messages.
 o tell_codeAction
  protected void tell_codeAction(KQMLmessage message,
                                 Agent parent,
                                 Resource resource,
                                 boolean instance)
Provides the location of class code for langauge, Interpreter or class resources. Resource is the Agent storage, instance is true if it should be stored as an instance, false if as a class.
 o tell_fileAction
  protected void tell_fileAction(KQMLmessage message,
                                 Agent parent,
                                 Resource resource)
Provides the location of a remote file which must be copied to the local disk.
 o ask_codeAction
  protected void ask_codeAction(KQMLmessage message,
                                String sender,
                                Agent parent,
                                Resource resource)
Request for the location of class code for langauge, Interpreter or class resources. resource is the Agent storage, instance is true if it should be stored as an instance, false if as a class.
 o ask_fileAction
  protected void ask_fileAction(KQMLmessage message,
                                String sender,
                                Agent parent,
                                Resource resource)
Request for the location of a file.
 o invalidate_code_fileAction
  protected void invalidate_code_fileAction(KQMLmessage message,
                                            Agent parent,
                                            Resource resource)
Request to invalidate a current code resource. If the code resource is present, remove it and its location.
 o tell_addressAction
  protected void tell_addressAction(KQMLmessage message,
                                    Agent parent)
Provides the address of an agent.
 o tell_addressANS
  protected void tell_addressANS(KQMLmessage message,
                                 ANS parent)
ANS has received the tell_address message, check for unique name, if unique, store in buffer, else send a non-unique-name message back.
 o tell_addressAgent
  protected void tell_addressAgent(KQMLmessage message,
                                   Agent parent)
Agent has received a tell-address message, store the received address in the local buffer. If the sender did not know the address then store a null in addresses.
 o ask_addressAction
  protected void ask_addressAction(KQMLmessage message,
                                   String sender,
                                   Agent parent)
Agent wants an address. Do not attempt to retrieve the address if the Agent does not possess it currently.
 o invalidate_addressAction
  protected void invalidate_addressAction(KQMLmessage message,
                                          Agent parent)
Remove-address message received.
 o invalidate_addressAgent
  protected void invalidate_addressAgent(KQMLmessage message,
                                         Agent parent)
Agent received a invalidate-address message, if the address exists in the local buffer, remove it.
 o invalidate_addressANS
  protected void invalidate_addressANS(KQMLmessage message,
                                       ANS parent)
ANS received an invalidate-address message, if the address exists in the local buffer, remove it, then echo the invalidate-address message to all of the agents which are in the buffer.
 o non_uniqueAction
  protected void non_uniqueAction(KQMLmessage message,
                                  Agent parent)
Agent tried to report a non-unique name, change name to the supplied unique-name, based on the address.

All Packages  Class Hierarchy  This Package  Previous  Next  Index