Class JavaAgent.agent.ANS
All Packages Class Hierarchy This Package Previous Next Index
Class JavaAgent.agent.ANS
java.lang.Object
|
+----JavaAgent.agent.Agent
|
+----JavaAgent.agent.ANS
- public class ANS
- extends Agent
ANS (Agent Name Server). This subclass of Agent functions as a central
repository of addresses for a group of agents. Allows agents who have no
prior knowledge of each other to communicate. Details of the messages sent
between the ANS and other agents are detailed in the documentation for
class AgentInterpreter.
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.
-
ANS(ContextInterface, String, URL, URL, File, File)
- Contructs an ANS with an output, name, init file, shared classes URL
and working directory.
-
init()
- Creates the ResourceManager, MessageHandler and reads in the init_file.
-
SendRemovalMessage(String, AgentAddress)
- Send Remove-address messages to all of the agents in the address buffer.
ANS
public ANS(ContextInterface context,
String n,
URL init_url,
URL shared_url,
File shared_dir,
File working_dir)
- Contructs an ANS with an output, name, init file, shared classes URL
and working directory.
- Parameters:
- n - String identifier for the Agent.
- init_url - URL for the initialization file.
- shared_url - URL for shared classes.
- shared_dir - Directory for local access to shared classes.
- working_dir - Directory for local files, will be null if the
Agent is unable to write to the local file system.
init
public void init()
- Creates the ResourceManager, MessageHandler and reads in the init_file.
- Overrides:
- init in class Agent
SendRemovalMessage
public void SendRemovalMessage(String name,
AgentAddress aa)
- Send Remove-address messages to all of the agents in the address buffer.
- Parameters:
- name - Agent name whose address should be removed.
- aa - The AgentAddress to remove.
All Packages Class Hierarchy This Package Previous Next Index