org.apache.activemq.broker.region.virtual
Class MirroredQueue

java.lang.Object
  extended by org.apache.activemq.broker.region.virtual.MirroredQueue
All Implemented Interfaces:
BrokerServiceAware, DestinationInterceptor

public class MirroredQueue
extends Object
implements DestinationInterceptor, BrokerServiceAware

Creates Mirrored Queue using a prefix and postfix to define the topic name on which to mirror the queue to.


Constructor Summary
MirroredQueue()
           
 
Method Summary
 void create(Broker broker, ConnectionContext context, ActiveMQDestination destination)
           
protected  Destination getMirrorDestination(Destination destination)
           
protected  ActiveMQDestination getMirrorTopic(ActiveMQDestination original)
           
 String getPostfix()
           
 String getPrefix()
           
 Destination intercept(Destination destination)
           
 boolean isCopyMessage()
           
 void remove(Destination destination)
           
 void setBrokerService(BrokerService brokerService)
           
 void setCopyMessage(boolean copyMessage)
          Sets whether a copy of the message will be sent to each destination.
 void setPostfix(String postfix)
          Sets any postix used to identify the queue consumers
 void setPrefix(String prefix)
          Sets the prefix wildcard used to identify the queue consumers for a given topic
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MirroredQueue

public MirroredQueue()
Method Detail

intercept

public Destination intercept(Destination destination)
Specified by:
intercept in interface DestinationInterceptor

remove

public void remove(Destination destination)
Specified by:
remove in interface DestinationInterceptor

create

public void create(Broker broker,
                   ConnectionContext context,
                   ActiveMQDestination destination)
Specified by:
create in interface DestinationInterceptor

getPostfix

public String getPostfix()

setPostfix

public void setPostfix(String postfix)
Sets any postix used to identify the queue consumers


getPrefix

public String getPrefix()

setPrefix

public void setPrefix(String prefix)
Sets the prefix wildcard used to identify the queue consumers for a given topic


isCopyMessage

public boolean isCopyMessage()

setCopyMessage

public void setCopyMessage(boolean copyMessage)
Sets whether a copy of the message will be sent to each destination. Defaults to true so that the forward destination is set as the destination of the message


setBrokerService

public void setBrokerService(BrokerService brokerService)
Specified by:
setBrokerService in interface BrokerServiceAware

getMirrorDestination

protected Destination getMirrorDestination(Destination destination)
                                    throws Exception
Throws:
Exception

getMirrorTopic

protected ActiveMQDestination getMirrorTopic(ActiveMQDestination original)


Copyright © 2005–2013 The Apache Software Foundation. All rights reserved.