org.objectweb.mobilitools.smi
Class AgentEntry

java.lang.Object
  |
  +--org.objectweb.mobilitools.smi.AgentEntry
All Implemented Interfaces:
AgentInfo

public class AgentEntry
extends java.lang.Object
implements AgentInfo

MobiliTools $Name: $, $Id: AgentEntry.java,v 1.1.1.1 2003/03/28 14:48:05 dillense Exp $

Data record holding information about an agent.


Constructor Summary
AgentEntry(MobileObject agent, Name name, java.lang.String place, boolean running, java.lang.String codebase, java.util.Properties properties)
          Creates a new data record describing an agent (with null as agency personality specific data)
AgentEntry(MobileObject agent, Name name, java.lang.String place, boolean running, java.lang.String codebase, java.util.Properties properties, java.lang.Object data)
          Creates a new data record describing an agent.
 
Method Summary
 MobileObject getAgent()
           
 java.lang.String getCodebase()
           
 java.lang.Object getData()
           
 Name getName()
           
 java.lang.String getPlace()
           
 java.util.Properties getProperties()
           
 boolean isRunning()
           
 boolean toggleRunning()
          Toggle the activity status between running and suspended.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgentEntry

public AgentEntry(MobileObject agent,
                  Name name,
                  java.lang.String place,
                  boolean running,
                  java.lang.String codebase,
                  java.util.Properties properties)
Creates a new data record describing an agent (with null as agency personality specific data)
Parameters:
agent - the Java object reference to the agent.
name - the MAF unique name of the agent.
place - the name of the place where the agent is residing.
codebase - the codebase for the agent's classes.
properties - a set of properties attached to the agent.

AgentEntry

public AgentEntry(MobileObject agent,
                  Name name,
                  java.lang.String place,
                  boolean running,
                  java.lang.String codebase,
                  java.util.Properties properties,
                  java.lang.Object data)
Creates a new data record describing an agent.
Parameters:
agent - the Java object reference to the agent.
name - the wrapper object of the agent's MAF unique name.
place - the name of the place where the agent is residing.
codebase - the codebase for the agent's classes.
properties - a set of properties attached to the agent.
data - opaque data that may be set by an agency personality.
Method Detail

getAgent

public MobileObject getAgent()
Specified by:
getAgent in interface AgentInfo
Returns:
the Java object reference to the agent.

getName

public Name getName()
Specified by:
getName in interface AgentInfo
Returns:
the wrapper object of the agent's MAF name.

getPlace

public java.lang.String getPlace()
Specified by:
getPlace in interface AgentInfo
Returns:
the name of the place where the agent is.

isRunning

public boolean isRunning()
Specified by:
isRunning in interface AgentInfo
Returns:
true if the agent is currently active, false if it is suspended.

toggleRunning

public boolean toggleRunning()
Toggle the activity status between running and suspended.
Specified by:
toggleRunning in interface AgentInfo
Returns:
true if the new status is running, false if it is suspended.

getCodebase

public java.lang.String getCodebase()
Specified by:
getCodebase in interface AgentInfo
Returns:
the codebase of the agent.

getProperties

public java.util.Properties getProperties()
Specified by:
getProperties in interface AgentInfo
Returns:
the set of properties attached to the agent.

getData

public java.lang.Object getData()
Specified by:
getData in interface AgentInfo
Returns:
the opaque data set by an agency personality.