Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
fr.dyade.aaa.agent.Agent
fr.dyade.aaa.jndi2.server.Container
Field Summary |
Constructor Summary | |
|
Method Summary | |
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
Methods inherited from class fr.dyade.aaa.agent.Agent | |
agentFinalize , agentInitialize , delete , delete , deploy , deploy , getId , getLogTopic , getName , isDeployed , isFixed , needToBeCommited , react , save , sendTo , sendTo , sendTo , setNoSave , toString |
public Container()
This agent cannot be swapped and has a reserved identifier on each agent server.
public void agentFinalize(boolean lastTime)
Called to inform this agent that it is garbaged and that it should free any active ressources that it has allocated. A subclass ofAgent
should override this method if it has any operation that it wants to perform before it is garbaged. For example, an agent with threads (a ProxyAgent for example) would use the initialize method to create the threads and theagentFinalize
method to stop them. The implementation of this method provided by theAgent
class does nothing.
- Overrides:
- agentFinalize in interface Agent
- Parameters:
lastTime
- true when last called by the factory on agent deletion.
public void agentInitialize(boolean firstTime) throws Exception
Gives this agent an opportunity to initialize after having been deployed, and each time it is loaded into memory. This function is first called by the factory agent, just after it deploys the agent. This function is used by agents with afixed
field set totrue
to initialize their transient variables, as it is called each time the agent server is restarted. This function is not declaredfinal
so that derived classes may change their reload policy. The implementation of this method provided by theAgent
class does nothing.
- Overrides:
- agentInitialize in interface Agent
- Parameters:
firstTime
- true when first called by the factory
public void react(AgentId from, Notification not) throws Exception
Defines the reaction of the agent when receiving a notification. This member function implements the common reactive behavior of an agent, it is called by the execution engine (see Engine class). If there is no corresponding reaction, the agent send anUnknownNotification
notification to the sender.
- Overrides:
- react in interface Agent
- Parameters:
from
- agent sending notificationnot
- notification to react to
public void readBag(ObjectInputStream in) throws IOException, ClassNotFoundException
- Specified by:
- readBag in interface BagSerializer
public void writeBag(ObjectOutputStream out) throws IOException
- Specified by:
- writeBag in interface BagSerializer