org.objectweb.joram.mom.dest
Class Queue

java.lang.Object
  extended by fr.dyade.aaa.agent.Agent
      extended by org.objectweb.joram.mom.dest.Destination
          extended by org.objectweb.joram.mom.dest.Queue
All Implemented Interfaces:
AgentMBean, BagSerializer, java.io.Serializable, AdminDestinationItf
Direct Known Subclasses:
AcquisitionQueue, ClusterQueue, DeadMQueue, DistributionQueue, FtpQueue, JMSBridgeQueue, SchedulerQueue

public class Queue
extends Destination
implements BagSerializer

A Queue agent is an agent hosting a MOM queue, and which behavior is provided by a QueueImpl instance.

See Also:
QueueImpl, Serialized Form

Field Summary
private static long serialVersionUID
          define serialVersionUID for interoperability
 
Fields inherited from class org.objectweb.joram.mom.dest.Destination
destImpl, logger, task
 
Fields inherited from class fr.dyade.aaa.agent.Agent
emptyString, fixed, logmon
 
Constructor Summary
Queue()
          Empty constructor for newInstance().
 
Method Summary
 DestinationImpl createsImpl(AgentId adminId, java.util.Properties prop)
          Creates the QueueImpl.
 byte getType()
          Returns the type of this destination: Queue or Topic.
 void react(AgentId from, Notification not)
          Distributes the received notifications to the appropriate reactions.
 void readBag(java.io.ObjectInputStream in)
          The readBag method is responsible for reading from the stream and restoring the agent's transient state.
 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 org.objectweb.joram.mom.dest.Destination
agentFinalize, agentInitialize, getMBeanName, init, setFreeReading, setFreeWriting, setNoSave, setSave
 
Methods inherited from class fr.dyade.aaa.agent.Agent
delete, delete, delete, deploy, deploy, getAgentId, getCommitTime, getId, getLogTopic, getName, getReactNb, getReactTime, 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

serialVersionUID

private static final long serialVersionUID
define serialVersionUID for interoperability

See Also:
Constant Field Values
Constructor Detail

Queue

public Queue()
Empty constructor for newInstance().

Method Detail

getType

public final byte getType()
Description copied from class: Destination
Returns the type of this destination: Queue or Topic.

Specified by:
getType in class Destination
Returns:
the type of this destination.
See Also:
DestinationConstants.TOPIC_TYPE, DestinationConstants.QUEUE_TYPE

createsImpl

public DestinationImpl createsImpl(AgentId adminId,
                                   java.util.Properties prop)
                            throws RequestException
Creates the QueueImpl.

Specified by:
createsImpl in class Destination
Parameters:
adminId - Identifier of the queue administrator.
prop - The initial set of properties.
Throws:
RequestException

react

public void react(AgentId from,
                  Notification not)
           throws java.lang.Exception
Distributes the received notifications to the appropriate reactions.

Overrides:
react in class Destination
Parameters:
from - agent sending notification
not - notification to react to
Throws:
java.lang.Exception

readBag

public void readBag(java.io.ObjectInputStream in)
             throws java.io.IOException,
                    java.lang.ClassNotFoundException
Description copied from interface: BagSerializer
The readBag method is responsible for reading from the stream and restoring the agent's transient state.

Specified by:
readBag in interface BagSerializer
Throws:
java.io.IOException
java.lang.ClassNotFoundException

writeBag

public void writeBag(java.io.ObjectOutputStream out)
              throws java.io.IOException
Description copied from interface: BagSerializer
The writeBag method is responsible for writing the extra data of this particular agent so that the corresponding readBag method can restore it.

Specified by:
writeBag in interface BagSerializer
Throws:
java.io.IOException


Copyright © 2010 ScalAgent D.T.. All Rights Reserved.