org.objectweb.joram.mom.dest
Class DistributionQueueImpl

java.lang.Object
  extended by org.objectweb.joram.mom.dest.DestinationImpl
      extended by org.objectweb.joram.mom.dest.QueueImpl
          extended by org.objectweb.joram.mom.dest.DistributionQueueImpl
All Implemented Interfaces:
java.io.Serializable, DestinationImplMBean, QueueImplMBean

public class DistributionQueueImpl
extends QueueImpl

The DistributionQueueImpl class implements the MOM distribution queue behavior, delivering messages via the DistributionModule.

See Also:
Serialized Form

Field Summary
private  DistributionModule distributionModule
           
static org.objectweb.util.monolog.api.Logger logger
           
private  java.util.Properties properties
           
private static long serialVersionUID
          define serialVersionUID for interoperability
 
Fields inherited from class org.objectweb.joram.mom.dest.QueueImpl
arrivalsCounter, consumers, contexts, defaultDMQId, defaultThreshold, deliveredMsgs, messages, msgTxPrefix, msgTxPrefixLength, nbMaxMsg, receiving, requests
 
Fields inherited from class org.objectweb.joram.mom.dest.DestinationImpl
_rights, agent, clients, creationDate, dmqId, freeReading, freeWriting, nbMsgsDeliverSinceCreation, nbMsgsReceiveSinceCreation, nbMsgsSentToDMQSinceCreation, READ, READWRITE, strbuf, WAKEUP_PERIOD, WRITE
 
Constructor Summary
DistributionQueueImpl(AgentId adminId, java.util.Properties properties)
          Constructs a DistributionQueueImpl instance.
 
Method Summary
 void close()
           
 void initialize(boolean firstTime)
          Initializes the destination.
 ClientMessages preProcess(AgentId from, ClientMessages cm)
          This method is needed to add processing before the standard handling.
 java.lang.String toString()
          Returns a string representation of this destination.
 
Methods inherited from class org.objectweb.joram.mom.dest.QueueImpl
abortReceiveRequest, acknowledgeRequest, addClientMessages, addMessage, browseRequest, checkDelivery, cleanPendingMessage, cleanPendingMessage, cleanWaitingRequest, cleanWaitingRequest, deliverMessages, denyRequest, doClientMessages, doDeleteNot, doRightRequest, doUnknownAgent, getClientMessages, getDefaultDMQId, getDefaultThreshold, getDeliveredMessageCount, getMessage, getMessages, getMessagesView, getMsgTxPrefix, getNbMaxMsg, getNbMsgsReceiveSinceCreation, getPendingMessageCount, getQueueMessage, getThreshold, getWaitingRequestCount, handleAdminRequestNot, handleExpiredNot, isUndeliverable, isValidJMXAttribute, messageDelivered, messageRemoved, readBag, receiveRequest, setMsgTxName, setNbMaxMsg, setThreshold, storeMessage, storeMessageHeader, wakeUpNot, writeBag
 
Methods inherited from class org.objectweb.joram.mom.dest.DestinationImpl
canBeDeleted, clientMessages, delete, deleteNot, forward, getCreationDate, getCreationTimeInMillis, getDestinationId, getDMQAgentId, getDMQId, getId, getJMXStatistics, getName, getNbMsgsDeliverSinceCreation, getNbMsgsSentToDMQSinceCreation, getPeriod, getRight, getRights, getRights, handleDeniedMessage, isAdministrator, isFreeReading, isFreeWriting, isLocal, isReader, isWriter, postProcess, processSetRight, replyToTopic, requestGroupNot, setAgent, setFreeReading, setFreeWriting, setNoSave, setPeriod, setRight, setSave, specialAdminProcess, specialAdminRequest, unknownAgent
 
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.dest.DestinationImplMBean
delete, getCreationDate, getCreationTimeInMillis, getDestinationId, getDMQId, getName, getNbMsgsDeliverSinceCreation, getNbMsgsSentToDMQSinceCreation, getPeriod, getRight, getRights, isFreeReading, isFreeWriting, setFreeReading, setFreeWriting, setPeriod
 

Field Detail

logger

public static org.objectweb.util.monolog.api.Logger logger

serialVersionUID

private static final long serialVersionUID
define serialVersionUID for interoperability

See Also:
Constant Field Values

distributionModule

private transient DistributionModule distributionModule

properties

private java.util.Properties properties
Constructor Detail

DistributionQueueImpl

public DistributionQueueImpl(AgentId adminId,
                             java.util.Properties properties)
                      throws RequestException
Constructs a DistributionQueueImpl instance.

Parameters:
adminId - Identifier of the administrator of the queue.
prop - The initial set of properties.
Throws:
RequestException
Method Detail

initialize

public void initialize(boolean firstTime)
Description copied from class: QueueImpl
Initializes the destination.

Overrides:
initialize in class QueueImpl
Parameters:
firstTime - true when first called by the factory

preProcess

public ClientMessages preProcess(AgentId from,
                                 ClientMessages cm)
Description copied from class: DestinationImpl
This method is needed to add processing before the standard handling. It is used in subclass of QueueImpl and TopicImpl. The incoming messages can be modified or deleted during the processing.

Overrides:
preProcess in class DestinationImpl
Parameters:
from - The sender of the message
cm - The incoming messages.
Returns:
The incoming messages after processing.
See Also:
DistributionModule.processMessages(ClientMessages), DestinationImpl.preProcess(AgentId, ClientMessages)

toString

public java.lang.String toString()
Description copied from class: QueueImpl
Returns a string representation of this destination.

Specified by:
toString in interface DestinationImplMBean
Overrides:
toString in class QueueImpl

close

public void close()


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