Agent System POND 1.0 (1.7.2000)

PkgAgentSystem
Class AgentData

java.lang.Object
  |
  +--PkgAgentSystem.AgentData

public class AgentData
extends Object

Class for storing the management data of an agent. Contains:

Public so PkgAgentSystem.GUI.GUIAgentSystem and PkgAgentSystem.GUI.MainFrame have access.

Version:
1.0, 1.7.2000
Author:
Michael Sonntag

Field Summary
 ClassificationSet additionalClassifications
          The set of additional classifications that were accepted by the system
 AgentBase agent
          The object of the agent
 byte challenge
          Whether the agent was challenged for knowing its private key and what result this did have
 AgentClassLoader classloader
          The classloader, through which the agent was loaded (and which enforces the security policy).
 CertificateWrapper[] codeCertificates
          The list of all certificates which were used for singing the code.
 String codeOrigin
           
 AgentIdentity identity
          The identity of the agent.
 boolean localCode
           
 boolean movingDenied
          true if the agent denied to be moved the last time moving was tried
protected  boolean msgsAllowed
          Whether currently messages can be delivered to the agent.
protected  Semaphor msgSem
          Semaphor for enabling and disabling message delivery to this agent.
 int permissionGroup
          The current permission-group the agent is in.
 String persistedFile
          The name of the file to which the agent was persisted.
 boolean persistingDenied
          true if the agent denied to be persisted the last time persisting was tried
 double scale
          Scale for the price of permissions for this particular agent (additional classifications will reduce this)
 
Constructor Summary
AgentData(String codeOrigin)
          Create a new dataset for an agent.
 
Method Summary
(package private)  void dumpInfo(boolean extensive)
          Prints the information on this agent.
 boolean equals(Object other)
          Compares this object to another one.
 int hashCode()
          Returns a hash code value for the object.
 void setAgentObject(AgentBase agent)
          Sets the agent object for this agent.
 
Methods inherited from class java.lang.Object
, clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

codeCertificates

public CertificateWrapper[] codeCertificates
The list of all certificates which were used for singing the code. Only those where the verification succeeded are listed here.

codeOrigin

public String codeOrigin

localCode

public boolean localCode

challenge

public byte challenge
Whether the agent was challenged for knowing its private key and what result this did have

permissionGroup

public int permissionGroup
The current permission-group the agent is in. Cached here for faster checking

scale

public double scale
Scale for the price of permissions for this particular agent (additional classifications will reduce this)

additionalClassifications

public ClassificationSet additionalClassifications
The set of additional classifications that were accepted by the system

classloader

public AgentClassLoader classloader
The classloader, through which the agent was loaded (and which enforces the security policy).

identity

public AgentIdentity identity
The identity of the agent. Cached here for easier access

agent

public AgentBase agent
The object of the agent

persistingDenied

public boolean persistingDenied
true if the agent denied to be persisted the last time persisting was tried

movingDenied

public boolean movingDenied
true if the agent denied to be moved the last time moving was tried

persistedFile

public String persistedFile
The name of the file to which the agent was persisted. Null if the agent is currently not persisted.

msgSem

protected Semaphor msgSem
Semaphor for enabling and disabling message delivery to this agent. Needed to avoid receiving messages while moving, terminating, etc. This might cause a deadlock (Example: Demo.TradeAgentSystem: Trader will start conversation with broadcast in onArrival. If one of the the recipient is currently in moving, this will otherwise wait till moving is finished (synchronization on the AgentData object). But the moving agent does the same in the his agent-system at the same time, so both will have to wait till the other has finished -> deadlock!

msgsAllowed

protected boolean msgsAllowed
Whether currently messages can be delivered to the agent.
Constructor Detail

AgentData

public AgentData(String codeOrigin)
Create a new dataset for an agent. The codeOrigin from where the code should be loaded can be supplied. If null, the agent system will look through the agent path, etc. for the classes and insert a packe or directory after the first class has been loaded
Parameters:
codeOrigin - from where the code is loaded. Might be null if unknown.
See Also:
ResourcePackage
Method Detail

setAgentObject

public void setAgentObject(AgentBase agent)
Sets the agent object for this agent. Also caches the identity.
Parameters:
agent - the object of the agent itself

equals

public boolean equals(Object other)
Compares this object to another one. Returns true if the other object is also an AgentData object and contains the same identity.
Parameters:
other - object to compare to this one
Returns:
true if the other object contains the same identity.
Overrides:
equals in class Object

hashCode

public int hashCode()
Returns a hash code value for the object.
Returns:
hashcode for this object
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

dumpInfo

void dumpInfo(boolean extensive)
Prints the information on this agent.
Parameters:
extensive - if true, additional information is printed (Class name, identity, agent object, classloader)

Agent System POND 1.0 (1.7.2000)

Submit a bug

Copyright 2000 Michael Sonntag & Institute for Information Processing and Microprocessor Technology (FIM), Johannes-Kepler-University Linz, Altenbergerstr. 69, A-4040 Linz, Austria.