org.apache.activemq.broker
Class CompositeDestinationBroker

java.lang.Object
  extended by org.apache.activemq.broker.BrokerFilter
      extended by org.apache.activemq.broker.CompositeDestinationBroker
All Implemented Interfaces:
Broker, Region, Service

public class CompositeDestinationBroker
extends BrokerFilter

This broker filter handles composite destinations. If a broker operation is invoked using a composite destination, this filter repeats the operation using each destination of the composite. HRC: I think this filter is dangerous to use to with the consumer operations. Multiple Subscription objects will be associated with a single JMS consumer each having a different idea of what the current pre-fetch dispatch size is. If this is used, then the client has to expect many more messages to be dispatched than the pre-fetch setting allows.


Field Summary
 
Fields inherited from class org.apache.activemq.broker.BrokerFilter
next
 
Constructor Summary
CompositeDestinationBroker(Broker next)
           
 
Method Summary
 void addProducer(ConnectionContext context, ProducerInfo info)
          A producer may register to send to multiple destinations via a composite destination.
 void removeProducer(ConnectionContext context, ProducerInfo info)
          A producer may de-register from sending to multiple destinations via a composite destination.
 void send(ProducerBrokerExchange producerExchange, Message message)
          Send a message to the broker to using the specified destination.
 
Methods inherited from class org.apache.activemq.broker.BrokerFilter
acknowledge, addBroker, addConnection, addConsumer, addDestination, addDestinationInfo, addSession, beginTransaction, brokerServiceStarted, commitTransaction, fastProducer, forgetTransaction, gc, getAdaptor, getAdminConnectionContext, getBrokerId, getBrokerName, getBrokerSequenceId, getBrokerService, getClients, getDestinationMap, getDestinations, getDestinations, getDurableDestinations, getExecutor, getPeerBrokerInfos, getPreparedTransactions, getRoot, getScheduler, getTempDataStore, getVmConnectorURI, isExpired, isFaultTolerantConfiguration, isFull, isStopped, messageConsumed, messageDelivered, messageDiscarded, messageExpired, messagePull, networkBridgeStarted, networkBridgeStopped, nowMasterBroker, postProcessDispatch, prepareTransaction, preProcessDispatch, processConsumerControl, processDispatchNotification, removeBroker, removeConnection, removeConsumer, removeDestination, removeDestinationInfo, removeSession, removeSubscription, rollbackTransaction, sendToDeadLetterQueue, setAdminConnectionContext, slowConsumer, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeDestinationBroker

public CompositeDestinationBroker(Broker next)
Method Detail

addProducer

public void addProducer(ConnectionContext context,
                        ProducerInfo info)
                 throws Exception
A producer may register to send to multiple destinations via a composite destination.

Specified by:
addProducer in interface Broker
Specified by:
addProducer in interface Region
Overrides:
addProducer in class BrokerFilter
Parameters:
context - the enviorment the operation is being executed under.
Throws:
Exception - TODO

removeProducer

public void removeProducer(ConnectionContext context,
                           ProducerInfo info)
                    throws Exception
A producer may de-register from sending to multiple destinations via a composite destination.

Specified by:
removeProducer in interface Broker
Specified by:
removeProducer in interface Region
Overrides:
removeProducer in class BrokerFilter
Parameters:
context - the enviorment the operation is being executed under.
Throws:
Exception - TODO

send

public void send(ProducerBrokerExchange producerExchange,
                 Message message)
          throws Exception
Description copied from interface: Region
Send a message to the broker to using the specified destination. The destination specified in the message does not need to match the destination the message is sent to. This is handy in case the message is being sent to a dead letter destination.

Specified by:
send in interface Region
Overrides:
send in class BrokerFilter
Parameters:
producerExchange - the environment the operation is being executed under.
Throws:
Exception - TODO


Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.