org.objectweb.joram.mom.dest
Class DeadMQueueImpl

java.lang.Object
  extended byorg.objectweb.joram.mom.dest.DestinationImpl
      extended byorg.objectweb.joram.mom.dest.QueueImpl
          extended byorg.objectweb.joram.mom.dest.DeadMQueueImpl
All Implemented Interfaces:
java.io.Serializable

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
 
Fields inherited from class org.objectweb.joram.mom.dest.QueueImpl
arrivalsCounter, consumers, contexts, deliveredMsgs, messages, persistenceModule, receiving, requests
 
Fields inherited from class org.objectweb.joram.mom.dest.DestinationImpl
adminId, clients, destId, dmqId, freeReading, freeWriting, READ, READWRITE, WRITE
 
Constructor Summary
DeadMQueueImpl(AgentId destId, AgentId adminId)
          Constructs a DeadMQueueImpl instance.
 
Method Summary
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.
protected  void doProcess(UnknownAgent uA)
          Overrides this QueueImpl method; if the sent notification was a QueueMsgReply instance, putting the sent message back in queue.
protected  void doReact(AgentId from, AcknowledgeRequest not)
          Overrides this QueueImpl method; AcknowledgeRequest requests are actually not processed in dead message queues.
protected  void doReact(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 doReact(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 doReact(AgentId from, DenyRequest not)
          Overrides this QueueImpl method; DenyRequest requests are actually not processed in dead message queues.
protected  void doReact(AgentId from, SetDMQRequest req)
          Overrides this DestinationImpl method; this request is not expected by a dead message queue.
protected  void doReact(AgentId from, SetThreshRequest req)
          Overrides this QueueImpl method; this request is not expected by a dead message queue.
static AgentId getId()
          Static method returning the default DMQ identifier.
static java.lang.Integer getThreshold()
          Static method returning the default threshold.
protected  void sendToDMQ(java.util.Vector deadMessages, AgentId dmqId)
          Overwrites this DestinationImpl method so that no messages may be sent by the DMQ to itself.
 java.lang.String toString()
           
 
Methods inherited from class org.objectweb.joram.mom.dest.QueueImpl
doProcess, doProcess, doProcess, doReact, doReact, doReact, doReact, isUndeliverable, messageDelivered, messageRemoved, react, specialProcess, storeMessage
 
Methods inherited from class org.objectweb.joram.mom.dest.DestinationImpl
canBeDeleted, doReact, doReact, doReact, doReact, doReact, doReact, doReact, isAdministrator, isReader, isWriter, processSetRight, sendToDMQ, specialAdminProcess
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DeadMQueueImpl

public DeadMQueueImpl(AgentId destId,
                      AgentId adminId)
Constructs a DeadMQueueImpl instance.

Parameters:
destId - Identifier of the agent hosting the queue.
adminId - Identifier of the administrator of the queue.
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class QueueImpl

getId

public static AgentId getId()
Static method returning the default DMQ identifier.


getThreshold

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


doReact

protected void doReact(AgentId from,
                       SetDMQRequest req)
                throws AccessException
Overrides this DestinationImpl method; this request is not expected by a dead message queue.

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

doReact

protected void doReact(AgentId from,
                       ClientMessages not)
                throws AccessException
Overrides this DestinationImpl method; the messages carried by the ClientMessages instance are stored in their arrival order, WRITE right is not checked.

Overrides:
doReact in class DestinationImpl
Throws:
AccessException - Never thrown.

doReact

protected void doReact(AgentId from,
                       SetThreshRequest req)
                throws AccessException
Overrides this QueueImpl method; this request is not expected by a dead message queue.

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

doReact

protected void doReact(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:
doReact in class QueueImpl
Throws:
AccessException - If the requester is not a reader.

doReact

protected void doReact(AgentId from,
                       AcknowledgeRequest not)
Overrides this QueueImpl method; AcknowledgeRequest requests are actually not processed in dead message queues.

Overrides:
doReact in class QueueImpl

doReact

protected void doReact(AgentId from,
                       DenyRequest not)
Overrides this QueueImpl method; DenyRequest requests are actually not processed in dead message queues.

Overrides:
doReact in class QueueImpl

doProcess

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

Overrides:
doProcess 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,
                         AgentId dmqId)
Overwrites this DestinationImpl method so that no messages may be sent by the DMQ to itself.



Copyright ? 2004 Scalagent - All rights reserved