Joram 5.0.8

org.objectweb.joram.mom.dest.jmsbridge
Class JMSBridgeQueueImpl

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

public class JMSBridgeQueueImpl
extends QueueImpl

The BridgeQueueImpl class implements a specific queue which forwards the messages it receives to a foreign JMS destination, and gets the messages it is requested to deliver from the same foreign destination.

This queue is in fact a bridge linking JORAM and a foreign JMS server.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.objectweb.joram.mom.dest.QueueImpl
arrivalsCounter, consumers, contexts, deliveredMsgs, logger, 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
JMSBridgeQueueImpl(fr.dyade.aaa.agent.AgentId destId, fr.dyade.aaa.agent.AgentId adminId, java.util.Properties prop)
          Constructs a BridgeQueueImpl instance.
 
Method Summary
 void bridgeAck(JMSBridgeAckNot not)
          Reacts to BridgeAckNot notifications holding the identifier of a message successfuly delivered to the foreign JMS server.
 void bridgeDelivery(fr.dyade.aaa.agent.AgentId from, JMSBridgeDeliveryNot not)
          Reacts to BridgeDeliveryNot notifications holding a message received from the foreign JMS server.
protected  void doDeleteNot(fr.dyade.aaa.agent.DeleteNot not)
          Method specifically processing a fr.dyade.aaa.agent.DeleteNot instance.
 ClientMessages preProcess(fr.dyade.aaa.agent.AgentId from, ClientMessages not)
          Method specializing the processing of a ClientMessages instance.
 void receiveRequest(fr.dyade.aaa.agent.AgentId from, ReceiveRequest not)
          Method specializing the reaction to a ReceiveRequest instance, requesting a message.
 java.lang.String toString()
          Returns a string representation of this destination.
 
Methods inherited from class org.objectweb.joram.mom.dest.QueueImpl
abortReceiveRequest, acknowledgeRequest, addMessage, browseRequest, checkDelivery, cleanPendingMessage, cleanWaitingRequest, deliverMessages, denyRequest, destinationAdminRequestNot, doClientMessages, doRightRequest, doUnknownAgent, getClientMessages, getClientMessages, getDeliveredMessageCount, getMessage, getMsgTxname, getNbMaxMsg, getNbMsgsReceiveSinceCreation, getPendingMessageCount, getPeriod, getStatisticHashtable, getThreshold, getWaitingRequestCount, isUndeliverable, messageDelivered, messageRemoved, monitGetDMQSettings, monitGetNbMaxMsg, monitGetPendingMessages, monitGetPendingRequests, readBag, removeMessages, setMsgTxName, setNbMaxMsg, setNbMaxMsgRequest, setPeriod, setThreshold, setThreshRequest, 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, setDMQRequest, 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
 

Constructor Detail

JMSBridgeQueueImpl

public JMSBridgeQueueImpl(fr.dyade.aaa.agent.AgentId destId,
                          fr.dyade.aaa.agent.AgentId adminId,
                          java.util.Properties prop)
Constructs a BridgeQueueImpl 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

bridgeDelivery

public void bridgeDelivery(fr.dyade.aaa.agent.AgentId from,
                           JMSBridgeDeliveryNot not)
Reacts to BridgeDeliveryNot notifications holding a message received from the foreign JMS server.

Parameters:
from - AgentId
not - BridgeDeliveryNot

bridgeAck

public void bridgeAck(JMSBridgeAckNot not)
Reacts to BridgeAckNot notifications holding the identifier of a message successfuly delivered to the foreign JMS server.

Parameters:
not - BridgeAckNot

receiveRequest

public void receiveRequest(fr.dyade.aaa.agent.AgentId from,
                           ReceiveRequest not)
                    throws AccessException
Method specializing the reaction to a ReceiveRequest instance, requesting a message.

This method stores the request and requests a message through the JMS interface.

Overrides:
receiveRequest in class QueueImpl
Throws:
AccessException - If the sender is not a reader.

preProcess

public ClientMessages preProcess(fr.dyade.aaa.agent.AgentId from,
                                 ClientMessages not)
Method specializing the processing of a ClientMessages instance.

This method sends the messages to the foreign JMS destination.

Overrides:
preProcess in class DestinationImpl

doDeleteNot

protected void doDeleteNot(fr.dyade.aaa.agent.DeleteNot not)
Method specifically processing a fr.dyade.aaa.agent.DeleteNot instance.

This method closes the JMS resources used for connecting to the foreign JMS server.

Overrides:
doDeleteNot in class QueueImpl

Joram 5.0.8

Copyright © 2005 Scalagent - All rights reserved