Joram 5.0.7

org.objectweb.joram.mom.dest
Class DeadMQueueImpl

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.DeadMQueueImpl
All Implemented Interfaces:
java.io.Serializable, DestinationImplMBean, QueueImplMBean

public class DeadMQueueImpl
extends QueueImpl

The DeadMQueueImpl class implements the MOM dead message queue behaviour, basically storing dead messages and delivering them upon clients requests.

See Also:
Serialized Form

Field Summary
static org.objectweb.util.monolog.api.Logger logger
           
 
Fields inherited from class org.objectweb.joram.mom.dest.QueueImpl
arrivalsCounter, consumers, contexts, deliveredMsgs, messages, nbMaxMsg, period, receiving, requests
 
Fields inherited from class org.objectweb.joram.mom.dest.DestinationImpl
_rights, clients, creationDate, destId, dmqId, freeReading, freeWriting, nbMsgsDeliverSinceCreation, nbMsgsReceiveSinceCreation, nbMsgsSendToDMQSinceCreation, READ, READWRITE, WRITE
 
Constructor Summary
DeadMQueueImpl(fr.dyade.aaa.agent.AgentId destId, fr.dyade.aaa.agent.AgentId adminId, java.util.Properties prop)
          Constructs a DeadMQueueImpl instance.
 
Method Summary
 void acknowledgeRequest(fr.dyade.aaa.agent.AgentId from, AcknowledgeRequest not)
          Overrides this QueueImpl method; AcknowledgeRequest requests are actually not processed in dead message queues.
 void browseRequest(fr.dyade.aaa.agent.AgentId from, BrowseRequest not)
          Overrides this QueueImpl method; messages matching the request's selector are actually sent as a reply; no cleaning nor DMQ sending is done.
protected  void deliverMessages(int index)
          Overrides this QueueImpl method; delivered messages are not kept for acknowledgement or denying; validity of messages is not checked and message fields are not updated; also, no sending to any DMQ.
 void denyRequest(fr.dyade.aaa.agent.AgentId from, DenyRequest not)
          Overrides this QueueImpl method; DenyRequest requests are actually not processed in dead message queues.
protected  void doUnknownAgent(fr.dyade.aaa.agent.UnknownAgent uA)
          Overrides this QueueImpl method; if the sent notification was a QueueMsgReply instance, putting the sent message back in queue.
static java.lang.Integer getDefaultThreshold()
          Static method returning the default threshold.
static fr.dyade.aaa.agent.AgentId getId()
          Static method returning the default DMQ identifier.
 ClientMessages preProcess(fr.dyade.aaa.agent.AgentId from, ClientMessages not)
          Overrides this DestinationImpl method; the messages carried by the ClientMessages instance are stored in their arrival order, WRITE right is not checked.
protected  void sendToDMQ(java.util.Vector deadMessages, fr.dyade.aaa.agent.AgentId dmqId)
          Overwrites this DestinationImpl method so that no messages may be sent by the DMQ to itself.
 void setDMQRequest(fr.dyade.aaa.agent.AgentId from, SetDMQRequest req)
          Overrides this DestinationImpl method; this request is not expected by a dead message queue.
 void setThreshRequest(fr.dyade.aaa.agent.AgentId from, SetThreshRequest req)
          Overrides this QueueImpl method; this request is not expected by a dead message queue.
 java.lang.String toString()
          Returns a string representation of this destination.
 
Methods inherited from class org.objectweb.joram.mom.dest.QueueImpl
abortReceiveRequest, addMessage, checkDelivery, cleanPendingMessage, cleanWaitingRequest, destinationAdminRequestNot, doClientMessages, doDeleteNot, doRightRequest, getClientMessages, getClientMessages, getDeliveredMessageCount, getMessage, getMsgTxname, getNbMaxMsg, getNbMsgsReceiveSinceCreation, getPendingMessageCount, getPeriod, getStatisticHashtable, getThreshold, getWaitingRequestCount, isUndeliverable, messageDelivered, messageRemoved, monitGetDMQSettings, monitGetNbMaxMsg, monitGetPendingMessages, monitGetPendingRequests, readBag, receiveRequest, removeMessages, setMsgTxName, setNbMaxMsg, setNbMaxMsgRequest, setPeriod, setThreshold, storeMessage, wakeUpNot, writeBag
 
Methods inherited from class org.objectweb.joram.mom.dest.DestinationImpl
canBeDeleted, clientMessages, deleteNot, forward, getCreationDate, getCreationTimeInMillis, getDestinationId, getDMQId, getNbMsgsDeliverSinceCreation, getNbMsgsSendToDMQSinceCreation, getRight, getRights, isAdministrator, isFreeReading, isFreeWriting, isLocal, isReader, isWriter, monitFreeAccess, monitGetReaders, monitGetStat, monitGetWriters, postProcess, postProcess, preProcess, processSetRight, replyToTopic, requestGroupNot, sendToDMQ, setAgent, setFreeReading, setFreeWriting, setRightRequest, 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
getCreationDate, getCreationTimeInMillis, getDestinationId, getDMQId, getNbMsgsDeliverSinceCreation, getNbMsgsSendToDMQSinceCreation, getRight, getRights, isFreeReading, isFreeWriting, setFreeReading, setFreeWriting
 

Field Detail

logger

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

DeadMQueueImpl

public DeadMQueueImpl(fr.dyade.aaa.agent.AgentId destId,
                      fr.dyade.aaa.agent.AgentId adminId,
                      java.util.Properties prop)
Constructs a DeadMQueueImpl instance.

Parameters:
destId - Identifier of the agent hosting the queue.
adminId - Identifier of the administrator of the queue.
prop - The initial set of properties.
Method Detail

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

getId

public static fr.dyade.aaa.agent.AgentId getId()
Static method returning the default DMQ identifier.


getDefaultThreshold

public static java.lang.Integer getDefaultThreshold()
Static method returning the default threshold.


setDMQRequest

public void setDMQRequest(fr.dyade.aaa.agent.AgentId from,
                          SetDMQRequest req)
                   throws AccessException
Overrides this DestinationImpl method; this request is not expected by a dead message queue.

Overrides:
setDMQRequest in class DestinationImpl
Throws:
AccessException - Not thrown.

preProcess

public ClientMessages preProcess(fr.dyade.aaa.agent.AgentId from,
                                 ClientMessages not)
Overrides this DestinationImpl method; the messages carried by the ClientMessages instance are stored in their arrival order, WRITE right is not checked.

Overrides:
preProcess in class DestinationImpl

setThreshRequest

public void setThreshRequest(fr.dyade.aaa.agent.AgentId from,
                             SetThreshRequest req)
                      throws AccessException
Overrides this QueueImpl method; this request is not expected by a dead message queue.

Overrides:
setThreshRequest in class QueueImpl
Throws:
AccessException - Not thrown.

browseRequest

public void browseRequest(fr.dyade.aaa.agent.AgentId from,
                          BrowseRequest not)
                   throws AccessException
Overrides this QueueImpl method; messages matching the request's selector are actually sent as a reply; no cleaning nor DMQ sending is done.

Overrides:
browseRequest in class QueueImpl
Throws:
AccessException - If the requester is not a reader.

acknowledgeRequest

public void acknowledgeRequest(fr.dyade.aaa.agent.AgentId from,
                               AcknowledgeRequest not)
Overrides this QueueImpl method; AcknowledgeRequest requests are actually not processed in dead message queues.

Overrides:
acknowledgeRequest in class QueueImpl

denyRequest

public void denyRequest(fr.dyade.aaa.agent.AgentId from,
                        DenyRequest not)
Overrides this QueueImpl method; DenyRequest requests are actually not processed in dead message queues.

Overrides:
denyRequest in class QueueImpl

doUnknownAgent

protected void doUnknownAgent(fr.dyade.aaa.agent.UnknownAgent uA)
Overrides this QueueImpl method; if the sent notification was a QueueMsgReply instance, putting the sent message back in queue.

Overrides:
doUnknownAgent in class QueueImpl

deliverMessages

protected void deliverMessages(int index)
Overrides this QueueImpl method; delivered messages are not kept for acknowledgement or denying; validity of messages is not checked and message fields are not updated; also, no sending to any DMQ.

Overrides:
deliverMessages in class QueueImpl
Parameters:
index - Index where starting to "browse" the requests.

sendToDMQ

protected void sendToDMQ(java.util.Vector deadMessages,
                         fr.dyade.aaa.agent.AgentId dmqId)
Overwrites this DestinationImpl method so that no messages may be sent by the DMQ to itself.


Joram 5.0.7

Copyright © 2005 Scalagent - All rights reserved