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

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

public class VirtualTopic
extends Object
implements VirtualDestination

Creates Virtual Topics using a prefix and postfix. The virtual destination creates a wildcard that is then used to look up all active queue subscriptions which match.


Constructor Summary
VirtualTopic()
           
 
Method Summary
 void create(Broker broker, ConnectionContext context, ActiveMQDestination destination)
           
 String getName()
           
 String getPostfix()
           
 String getPrefix()
           
 ActiveMQDestination getVirtualDestination()
          Returns the virtual destination
 Destination intercept(Destination destination)
          Creates a virtual destination from the physical destination
 boolean isLocal()
           
 boolean isSelectorAware()
           
 void remove(Destination destination)
           
 void setLocal(boolean local)
           
 void setName(String name)
           
 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
 void setSelectorAware(boolean selectorAware)
          Indicates whether the selectors of consumers are used to determine dispatch to a virtual destination, when true only messages matching an existing consumer will be dispatched.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VirtualTopic

public VirtualTopic()
Method Detail

getVirtualDestination

public ActiveMQDestination getVirtualDestination()
Description copied from interface: VirtualDestination
Returns the virtual destination

Specified by:
getVirtualDestination in interface VirtualDestination

intercept

public Destination intercept(Destination destination)
Description copied from interface: VirtualDestination
Creates a virtual destination from the physical destination

Specified by:
intercept in interface DestinationInterceptor
Specified by:
intercept in interface VirtualDestination

create

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

remove

public void remove(Destination destination)
Specified by:
remove 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


getName

public String getName()

setName

public void setName(String name)

setSelectorAware

public void setSelectorAware(boolean selectorAware)
Indicates whether the selectors of consumers are used to determine dispatch to a virtual destination, when true only messages matching an existing consumer will be dispatched.

Parameters:
selectorAware - when true take consumer selectors into consideration

isSelectorAware

public boolean isSelectorAware()

isLocal

public boolean isLocal()

setLocal

public void setLocal(boolean local)


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