Class EscapeAgent
java.lang.Object
|
+--org.objectweb.mobilitools.smi.goodies.BasicMobileObject
|
+--EscapeAgent
- All Implemented Interfaces:
- MobileObject, java.io.Serializable
- public class EscapeAgent
- extends BasicMobileObject
MobiliTools $Name: $, $Id: EscapeAgent.java,v 1.1.1.1 2003/03/28 14:47:58 dillense Exp $
This agent example class shows how an agent may escape from an agency before it shuts down.
The easiest way to try this example is to run at least 2 GUI-enabled agencies, to
create at least one EscapeAgent instance in one of the agencies, and to shut it down.
NB: THIS EXAMPLE REQUIRES THE MAFFINDER TO BE RUNNING BEFORE LAUNCHING AGENCIES AND AGENTS.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
my_name
Name my_name
EscapeAgent
public EscapeAgent()
afterBirth
public void afterBirth(AgentSystem agency,
AgentInfo entry,
java.lang.Object argument)
throws BadOperation
- Overrides:
afterBirth
in class BasicMobileObject
beforeShutdown
public void beforeShutdown()
- Get the list of agencies in current region, and escape to the first one in the list (if any).
- Overrides:
beforeShutdown
in class BasicMobileObject
beforeDeath
public void beforeDeath()
- Overrides:
beforeDeath
in class BasicMobileObject