next up previous contents
Next: System Agents Up: AgentSystem Class Previous: Methods of the PlatformCommunicationIFace   Contents

General Methods for (System) Agents

System Agents need access to some parts of the System to do their work. Remember that all calls to the System are wrapped through the SysAgentHelper.

getLoader
Return the AgentLoader (and with this the Agent itself too) of the Agent with the given AgentID. This method is called directly by the admin System Agent on the platform without going through the helper. The admin is the only System Agent which uses this method, so it was not necessary to put it into the helper.
getSysAgent
Returns the System Agent of the given AgentID.
getAgentStatus
Returns an integer representing the current status of the Agent of the given AgentID. The status codes are defined in the AgentLoader class.
getSystemName
Returns the name (not the ID) of the System.
getHost
Returns the ip address of the machine where the System is executing. It is very probably that the access to the java.net package is restricted by the security in future so this value is not accessible through standard library calls.
getSystemID
Returns the AgentID of the System.
getAgentSystemInfo
Returns the AgentSystemInfo object of the System.
getSystem
Returns a reference to System itself. This is only for use by admin System Agents and all other request will result in a security exception.
The last method to mention here is the main method of this class since this is the main class of the whole Agent System it has to be started by the command line. Because the System is dependent of a given configuration file the main exits with an error when there is no parameter (the config file) given at the command line. After checking this, it instantiates a new AgentSystem and starts its thread by calling the start() method (which is inherited by the extended Thread class). Then the AgentSystem is started and is proceeding with its work.


next up previous contents
Next: System Agents Up: AgentSystem Class Previous: Methods of the PlatformCommunicationIFace   Contents
Thomas Letsch 2001-02-21