|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.dyade.aaa.agent.Agent
fr.dyade.aaa.jndi2.server.Container
| Field Summary |
| Fields inherited from class fr.dyade.aaa.agent.Agent |
fixed, logmon, name |
| Constructor Summary | |
Container()
This agent cannot be swapped and has a reserved identifier on each agent server. |
|
| Method Summary | |
void |
addEntryPoint(EntryPoint entryPoint)
|
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. |
void |
agentInitialize(boolean firstTime)
Gives this agent an opportunity to initialize after having been deployed, and each time it is loaded into memory. |
void |
react(AgentId from,
Notification not)
Defines the reaction of the agent when receiving a notification. |
void |
readBag(java.io.ObjectInputStream in)
The readBag method is responsible for reading from the stream and restoring the agent's transient state. |
void |
setBagSerializer(BagSerializer bagSerializer)
|
void |
setLifeCycleListener(LifeCycleListener lifeCycleListener)
|
void |
writeBag(java.io.ObjectOutputStream out)
The writeBag method is responsible for writing the extra data of this particular agent so that the corresponding readBag method can restore it. |
| Methods inherited from class fr.dyade.aaa.agent.Agent |
delete, delete, deploy, deploy, getId, getLogTopic, getName, isDeployed, isFixed, needToBeCommited, save, sendTo, sendTo, sendTo, setNoSave, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Container()
| Method Detail |
public void addEntryPoint(EntryPoint entryPoint)
public void setLifeCycleListener(LifeCycleListener lifeCycleListener)
public void setBagSerializer(BagSerializer bagSerializer)
public void react(AgentId from,
Notification not)
throws java.lang.Exception
Agent
If there is no corresponding reaction, the agent send an
UnknownNotification notification to the sender.
react in class Agentfrom - agent sending notificationnot - notification to react to
java.lang.Exception - unspecialized exception
public void agentInitialize(boolean firstTime)
throws java.lang.Exception
AgentThis function is first called by the factory agent, just after it deploys the agent.
This function is used by agents with a fixed field set to
true to initialize their transient variables, as it is called
each time the agent server is restarted.
This function is not declared final so that derived classes
may change their reload policy. The implementation of this method provided
by the Agent class does nothing.
agentInitialize in class AgentfirstTime - true when first called by the factory
java.lang.Exception - unspecialized exceptionpublic void agentFinalize(boolean lastTime)
AgentAgent 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 the agentFinalize method to
stop them.
The implementation of this method provided by the Agent class
does nothing.
agentFinalize in class AgentlastTime - true when last called by the factory on agent deletion.
public void writeBag(java.io.ObjectOutputStream out)
throws java.io.IOException
BagSerializer
writeBag in interface BagSerializerjava.io.IOException
public void readBag(java.io.ObjectInputStream in)
throws java.io.IOException,
java.lang.ClassNotFoundException
BagSerializer
readBag in interface BagSerializerjava.io.IOException
java.lang.ClassNotFoundException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||