org.objectweb.joram.mom.proxies.UserAgent Class Reference

Inherits fr.dyade.aaa.agent.Agent, fr.dyade.aaa.agent.BagSerializer, and org.objectweb.joram.mom.proxies.ProxyAgentItf.

Inheritance diagram for org.objectweb.joram.mom.proxies.UserAgent:

Inheritance graph
[legend]
Collaboration diagram for org.objectweb.joram.mom.proxies.UserAgent:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 UserAgent ()
 UserAgent (int stamp)
void agentInitialize (boolean firstTime) throws Exception
void agentFinalize (boolean lastTime)
void react (AgentId from, Notification not) throws Exception
void sendNot (AgentId to, Notification not)
void sendToClient (int key, AbstractJmsReply reply)
void setNoSave ()
void setSave ()
void readBag (ObjectInputStream in) throws IOException, ClassNotFoundException
void writeBag (ObjectOutputStream out) throws IOException

Classes

class  HeartBeatTask

Detailed Description

Class of a user proxy agent.

Definition at line 57 of file UserAgent.java.


Constructor & Destructor Documentation

org.objectweb.joram.mom.proxies.UserAgent.UserAgent (  ) 

Creates a new user proxy.

See also:
ConnectionManager

Definition at line 85 of file UserAgent.java.

org.objectweb.joram.mom.proxies.UserAgent.UserAgent ( int  stamp  ) 

Creates a new user proxy.

See also:
ConnectionManager

Definition at line 95 of file UserAgent.java.


Member Function Documentation

void org.objectweb.joram.mom.proxies.UserAgent.agentInitialize ( boolean  firstTime  )  throws Exception

(Re)initializes the agent when (re)loading.

Reimplemented from fr.dyade.aaa.agent.Agent.

Definition at line 108 of file UserAgent.java.

References fr.dyade.aaa.agent.Agent.getId(), org.objectweb.joram.mom.proxies.ProxyImpl.getPeriod(), org.objectweb.joram.mom.proxies.ProxyImpl.initialize(), and fr.dyade.aaa.agent.WakeUpTask.schedule().

Here is the call graph for this function:

void org.objectweb.joram.mom.proxies.UserAgent.agentFinalize ( boolean  lastTime  ) 

Finalizes the agent before it is garbaged.

Reimplemented from fr.dyade.aaa.agent.Agent.

Definition at line 125 of file UserAgent.java.

void org.objectweb.joram.mom.proxies.UserAgent.react ( AgentId  from,
Notification  not 
) throws Exception

Overrides the Agent class react method for providing the JMS client proxy with its specific behaviour.

A JMS proxy specifically reacts to the following notifications:

Reimplemented from fr.dyade.aaa.agent.Agent.

Definition at line 149 of file UserAgent.java.

References org.objectweb.joram.mom.proxies.ProxyImpl.cleanPendingMessages(), fr.dyade.aaa.agent.Agent.getId(), org.objectweb.joram.mom.proxies.ProxyImpl.getPeriod(), org.objectweb.joram.mom.proxies.ProxyImpl.react(), fr.dyade.aaa.agent.WakeUpTask.schedule(), and org.objectweb.joram.mom.proxies.UserAgent.setNoSave().

Here is the call graph for this function:

void org.objectweb.joram.mom.proxies.UserAgent.sendNot ( AgentId  to,
Notification  not 
)

Sends a notification to the specified agent.

Parameters:
to the identifier of the recipient agent
not the notification to send

Implements org.objectweb.joram.mom.proxies.ProxyAgentItf.

Definition at line 394 of file UserAgent.java.

References fr.dyade.aaa.agent.Agent.sendTo().

Here is the call graph for this function:

void org.objectweb.joram.mom.proxies.UserAgent.sendToClient ( int  key,
AbstractJmsReply  reply 
)

Sends a reply to the client connected through the specified connection.

Parameters:
key the key of the connection the client is connected through.
reply the reply to send to the client.

Implements org.objectweb.joram.mom.proxies.ProxyAgentItf.

Definition at line 409 of file UserAgent.java.

References org.objectweb.joram.mom.proxies.ConnectionContext.pushReply().

Here is the call graph for this function:

void org.objectweb.joram.mom.proxies.UserAgent.setNoSave (  ) 

Sets the updated field to false so that the agent state is not saved after the current reaction; the field is set back to true for the next reaction.

Reimplemented from fr.dyade.aaa.agent.Agent.

Definition at line 475 of file UserAgent.java.

Referenced by org.objectweb.joram.mom.proxies.UserAgent.react().

void org.objectweb.joram.mom.proxies.UserAgent.setSave (  ) 

Sets the updated field to true so that the agent state is saved after the current reaction.

Reimplemented from fr.dyade.aaa.agent.Agent.

Definition at line 482 of file UserAgent.java.

void org.objectweb.joram.mom.proxies.UserAgent.readBag ( ObjectInputStream  in  )  throws IOException, ClassNotFoundException

The readBag method is responsible for reading from the stream and restoring the agent's transient state.

Implements fr.dyade.aaa.agent.BagSerializer.

Definition at line 489 of file UserAgent.java.

void org.objectweb.joram.mom.proxies.UserAgent.writeBag ( ObjectOutputStream  out  )  throws IOException

The writeBag method is responsible for writing the extra data of this particular agent so that the corresponding readBag method can restore it.

Implements fr.dyade.aaa.agent.BagSerializer.

Definition at line 506 of file UserAgent.java.


The documentation for this class was generated from the following file:
Generated on Tue Sep 16 16:20:21 2008 for joram by  doxygen 1.5.0