Joram ${version}

org.objectweb.joram.mom.dest
Class Destination

java.lang.Object
  extended byfr.dyade.aaa.agent.Agent
      extended byorg.objectweb.joram.mom.dest.Destination
All Implemented Interfaces:
AdminDestinationItf, fr.dyade.aaa.agent.AgentMBean, java.io.Serializable
Direct Known Subclasses:
Queue, Topic

public abstract class Destination
extends fr.dyade.aaa.agent.Agent
implements AdminDestinationItf

A Destination agent is an agent hosting a MOM destination, for example a Queue or a Topic. Its behaviour is provided by a DestinationImpl instance.

See Also:
DestinationImpl, Serialized Form

Field Summary
protected  DestinationImpl destImpl
          The reference of the DestinationImpl instance providing this this agent with its Destination behaviour.
 
Fields inherited from class fr.dyade.aaa.agent.Agent
fixed, logmon, name, nullName
 
Constructor Summary
  Destination()
          Empty constructor for newInstance().
  Destination(fr.dyade.aaa.agent.AgentId adminId)
          Constructs a Destination agent.
protected Destination(boolean fixed)
          Constructor with parameters for fixing the destination.
protected Destination(java.lang.String name, boolean fixed, int stamp)
          Constructor with parameters for fixing the destination and specifying its identifier.
 
Method Summary
 void agentFinalize(boolean lastTime)
          Finalizes the agent before it is garbaged.
protected  void agentInitialize(boolean firstTime)
          Gives this agent an opportunity to initialize after having been deployed, and each time it is loaded into memory.
abstract  DestinationImpl createsImpl(fr.dyade.aaa.agent.AgentId adminId)
          Creates the specific implementation.
 void init(fr.dyade.aaa.agent.AgentId adminId)
          Initializes the destination by creating the DestinationImpl object.
 void react(fr.dyade.aaa.agent.AgentId from, fr.dyade.aaa.agent.Notification not)
          Reactions to notifications are implemented by the DestinationImpl class.
protected  void setNoSave()
           
 void setProperties(java.util.Properties prop)
          Sets properties for the destination.
protected  void setSave()
           
 
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
 

Field Detail

destImpl

protected DestinationImpl destImpl
The reference of the DestinationImpl instance providing this this agent with its Destination behaviour.

Constructor Detail

Destination

public Destination()
Empty constructor for newInstance().


Destination

public Destination(fr.dyade.aaa.agent.AgentId adminId)
Constructs a Destination agent.

Parameters:
adminId - Identifier of the agent which will be the administrator of the topic.

Destination

protected Destination(boolean fixed)
Constructor with parameters for fixing the destination.


Destination

protected Destination(java.lang.String name,
                      boolean fixed,
                      int stamp)
Constructor with parameters for fixing the destination and specifying its identifier.

Method Detail

init

public final void init(fr.dyade.aaa.agent.AgentId adminId)
Initializes the destination by creating the DestinationImpl object.

Specified by:
init in interface AdminDestinationItf
Parameters:
adminId - Identifier of the destination administrator.

createsImpl

public abstract DestinationImpl createsImpl(fr.dyade.aaa.agent.AgentId adminId)
Creates the specific implementation.

Parameters:
adminId - Identifier of the topic administrator.

setProperties

public void setProperties(java.util.Properties prop)
Sets properties for the destination.

Empty method as no properties may be set for the generic destination.

Specified by:
setProperties in interface AdminDestinationItf

agentInitialize

protected void agentInitialize(boolean firstTime)
                        throws java.lang.Exception
Gives this agent an opportunity to initialize after having been deployed, and each time it is loaded into memory.

Parameters:
firstTime - true when first called by the factory
Throws:
java.lang.Exception - unspecialized 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
Reactions to notifications are implemented by the DestinationImpl class.

Throws:
java.lang.Exception

setNoSave

protected void setNoSave()

setSave

protected void setSave()

Joram ${version}

Copyright © 2005 Scalagent - All rights reserved