prueba1.agent
Class Agent

java.lang.Object
  |
  +--prueba1.agent.Agent
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Alex0_0, Alex106, Alex2, AlexGUI

public abstract class Agent
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
 java.lang.String method
          The method that will be called in the destination
 PlatformProxy myPlatform
          A pointer to the platform in which the agent is existing at this moment It is transient to avoid having to unreference it when serializing the agent.
 
Constructor Summary
Agent()
          The constructor for the agent
 
Method Summary
 void errorRaised()
          This method is called when there is an error, by the classes that manipulates the agents.
 java.lang.String getName()
          Retrieves the name of the agent
 void moveTo(int _secs, int _num, java.lang.String _address, int _port)
          Moves the agent to the host and the port specified by the caller
 void setName(java.lang.String name)
          Sets the name of the agent
abstract  void start()
          This method is to be called each time the agent is started.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

method

public java.lang.String method
The method that will be called in the destination

myPlatform

public transient PlatformProxy myPlatform
A pointer to the platform in which the agent is existing at this moment It is transient to avoid having to unreference it when serializing the agent.
Constructor Detail

Agent

public Agent()
The constructor for the agent
Method Detail

setName

public void setName(java.lang.String name)
Sets the name of the agent
Parameters:
name -  

getName

public java.lang.String getName()
Retrieves the name of the agent
Returns:
String

moveTo

public void moveTo(int _secs,
                   int _num,
                   java.lang.String _address,
                   int _port)
Moves the agent to the host and the port specified by the caller
Parameters:
_secs -  
_address - fully qualified name of the host
_port - port number of the machine

start

public abstract void start()
This method is to be called each time the agent is started. Users have to implement this method by extending this class

errorRaised

public void errorRaised()
This method is called when there is an error, by the classes that manipulates the agents. It has to be overridden by the agent if it wants some special behaviour.