Joram ${version}

org.objectweb.joram.mom.proxies
Class UserAgent

java.lang.Object
  extended byfr.dyade.aaa.agent.Agent
      extended byorg.objectweb.joram.mom.proxies.UserAgent
All Implemented Interfaces:
fr.dyade.aaa.agent.AgentMBean, fr.dyade.aaa.agent.BagSerializer, ProxyAgentItf, java.io.Serializable

public class UserAgent
extends fr.dyade.aaa.agent.Agent
implements fr.dyade.aaa.agent.BagSerializer, ProxyAgentItf

Class of a user proxy agent.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class fr.dyade.aaa.agent.Agent
fixed, logmon, name, nullName
 
Constructor Summary
UserAgent()
          Creates a new user proxy.
UserAgent(int stamp)
          Creates a new user proxy.
 
Method Summary
 void agentFinalize(boolean lastTime)
          Finalizes the agent before it is garbaged.
 void agentInitialize(boolean firstTime)
          (Re)initializes the agent when (re)loading.
 void react(fr.dyade.aaa.agent.AgentId from, fr.dyade.aaa.agent.Notification not)
          Overrides the Agent class react method for providing the JMS client proxy with its specific behaviour.
 void readBag(java.io.ObjectInputStream in)
           
 void sendNot(fr.dyade.aaa.agent.AgentId to, fr.dyade.aaa.agent.Notification not)
          Sends a notification to the specified agent.
 void sendToClient(int key, AbstractJmsReply reply)
          Sends a reply to the client connected through the specified connection.
 void setNoSave()
           
 void setSave()
           
 void writeBag(java.io.ObjectOutputStream out)
           
 
Methods inherited from class fr.dyade.aaa.agent.Agent
delete, delete, deploy, deploy, getAgentId, getId, getLogTopic, getName, isDeployed, isFixed, needToBeCommited, save, sendTo, sendTo, sendTo, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.objectweb.joram.mom.proxies.ProxyAgentItf
getId
 

Constructor Detail

UserAgent

public UserAgent()
Creates a new user proxy.

See Also:
AdminTopicImpl, ConnectionManager

UserAgent

public UserAgent(int stamp)
Creates a new user proxy.

See Also:
AdminTopicImpl, ConnectionManager
Method Detail

agentInitialize

public void agentInitialize(boolean firstTime)
                     throws java.lang.Exception
(Re)initializes the agent when (re)loading.

Throws:
java.lang.Exception

agentFinalize

public void agentFinalize(boolean lastTime)
Finalizes the agent before it is garbaged.


react

public void react(fr.dyade.aaa.agent.AgentId from,
                  fr.dyade.aaa.agent.Notification not)
           throws java.lang.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:

Throws:
java.lang.Exception

sendNot

public void sendNot(fr.dyade.aaa.agent.AgentId to,
                    fr.dyade.aaa.agent.Notification not)
Sends a notification to the specified agent.

Specified by:
sendNot in interface ProxyAgentItf
Parameters:
to - the identifier of the recipient agent
not - the notification to send

sendToClient

public void sendToClient(int key,
                         AbstractJmsReply reply)
Sends a reply to the client connected through the specified connection.

Specified by:
sendToClient in interface ProxyAgentItf
Parameters:
key - the key of the connection the client is connected through.
reply - the reply to send to the client.

setNoSave

public void setNoSave()
Specified by:
setNoSave in interface ProxyAgentItf

setSave

public void setSave()
Specified by:
setSave in interface ProxyAgentItf

readBag

public void readBag(java.io.ObjectInputStream in)
             throws java.io.IOException,
                    java.lang.ClassNotFoundException
Specified by:
readBag in interface fr.dyade.aaa.agent.BagSerializer
Throws:
java.io.IOException
java.lang.ClassNotFoundException

writeBag

public void writeBag(java.io.ObjectOutputStream out)
              throws java.io.IOException
Specified by:
writeBag in interface fr.dyade.aaa.agent.BagSerializer
Throws:
java.io.IOException

Joram ${version}

Copyright © 2005 Scalagent - All rights reserved