Joram 5.2.4

org.objectweb.joram.mom.util
Class DMQManager

java.lang.Object
  extended by org.objectweb.joram.mom.util.DMQManager

public class DMQManager
extends java.lang.Object

The DMQManager is made to stock the dead messages before sending them to the dead message queue, only if such a queue is defined.


Field Summary
static org.objectweb.util.monolog.api.Logger logger
           
 
Constructor Summary
DMQManager(fr.dyade.aaa.agent.AgentId currentDestDmq, fr.dyade.aaa.agent.AgentId senderId)
          Creates a DMQManager.
DMQManager(fr.dyade.aaa.agent.AgentId specificDmq, fr.dyade.aaa.agent.AgentId currentDestDmq, fr.dyade.aaa.agent.AgentId senderId)
          Creates a DMQManager.
 
Method Summary
 void addDeadMessage(Message mess, short reason)
          Stocks a dead message waiting to be sent to the DMQ.
 void sendToDMQ()
          Sends previously stocked messages to the appropriate DMQ.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

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

DMQManager

public DMQManager(fr.dyade.aaa.agent.AgentId specificDmq,
                  fr.dyade.aaa.agent.AgentId currentDestDmq,
                  fr.dyade.aaa.agent.AgentId senderId)
Creates a DMQManager. The specificDmq is used in priority. If null, destination DMQ is used if it exists, else default DMQ is used. If none exists, dead messages will be lost.

Parameters:
specificDmq - Identifier of the dead message queue to use in priority.
currentDestDmq - The DMQ of the destination
senderId - The id of the destination. This is used to avoid sending to itself.

DMQManager

public DMQManager(fr.dyade.aaa.agent.AgentId currentDestDmq,
                  fr.dyade.aaa.agent.AgentId senderId)
Creates a DMQManager. Destination DMQ is used if it exists, else default DMQ is used. If none exists, dead messages will be lost

Parameters:
currentDestDmq - The DMQ of the destination
senderId - The id of the destination. This is used to avoid sending to itself.
Method Detail

addDeadMessage

public void addDeadMessage(Message mess,
                           short reason)
Stocks a dead message waiting to be sent to the DMQ. If no DMQ was found at creation time, the message is lost.

Parameters:
mess - The message to stock
reason - The reason explaining why the message has to be send to the DMQ. It can be one of the following: EXPIRED, NOT_WRITEABLE, UNDELIVERABLE, ADMIN_DELETED, DELETED_DEST, QUEUE_FULL or UNEXPECTED_ERROR.

sendToDMQ

public void sendToDMQ()
Sends previously stocked messages to the appropriate DMQ.


Joram 5.2.4

Copyright © 2000 - 2009 Scalagent D.T. - All rights reserved