Class VirtualTopic
- java.lang.Object
-
- 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
Constructors Constructor Description VirtualTopic()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreate(Broker broker, ConnectionContext context, ActiveMQDestination destination)booleanequals(Object obj)ActiveMQDestinationgetMappedDestinations()Returns mapped destination(s)StringgetName()StringgetPostfix()StringgetPrefix()ActiveMQDestinationgetVirtualDestination()Returns the virtual destinationinthashCode()Destinationintercept(Destination destination)Creates a virtual destination from the physical destinationDestinationinterceptMappedDestination(Destination destination)Creates a mapped destinationbooleanisConcurrentSend()booleanisDropOnResourceLimit()booleanisLocal()booleanisSelectorAware()booleanisSetOriginalDestination()booleanisTransactedSend()voidremove(Destination destination)voidsetConcurrentSend(boolean concurrentSend)When true, dispatch to matching destinations in parallel (in multiple threads)voidsetDropOnResourceLimit(boolean dropOnResourceLimit)voidsetLocal(boolean local)voidsetName(String name)voidsetPostfix(String postfix)Sets any postix used to identify the queue consumersvoidsetPrefix(String prefix)Sets the prefix wildcard used to identify the queue consumers for a given topicvoidsetSelectorAware(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.voidsetSetOriginalDestination(boolean setOriginalDestination)voidsetTransactedSend(boolean transactedSend)When true, dispatch to matching destinations always uses a transaction.StringtoString()
-
-
-
Method Detail
-
getVirtualDestination
public ActiveMQDestination getVirtualDestination()
Description copied from interface:VirtualDestinationReturns the virtual destination- Specified by:
getVirtualDestinationin interfaceVirtualDestination
-
intercept
public Destination intercept(Destination destination)
Description copied from interface:VirtualDestinationCreates a virtual destination from the physical destination- Specified by:
interceptin interfaceDestinationInterceptor- Specified by:
interceptin interfaceVirtualDestination
-
getMappedDestinations
public ActiveMQDestination getMappedDestinations()
Description copied from interface:VirtualDestinationReturns mapped destination(s)- Specified by:
getMappedDestinationsin interfaceVirtualDestination
-
interceptMappedDestination
public Destination interceptMappedDestination(Destination destination)
Description copied from interface:VirtualDestinationCreates a mapped destination- Specified by:
interceptMappedDestinationin interfaceVirtualDestination
-
create
public void create(Broker broker, ConnectionContext context, ActiveMQDestination destination) throws Exception
- Specified by:
createin interfaceDestinationInterceptor- Throws:
Exception
-
remove
public void remove(Destination destination)
- Specified by:
removein interfaceDestinationInterceptor
-
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)
-
isConcurrentSend
public boolean isConcurrentSend()
-
setConcurrentSend
public void setConcurrentSend(boolean concurrentSend)
When true, dispatch to matching destinations in parallel (in multiple threads)- Parameters:
concurrentSend-
-
isTransactedSend
public boolean isTransactedSend()
-
setTransactedSend
public void setTransactedSend(boolean transactedSend)
When true, dispatch to matching destinations always uses a transaction.- Parameters:
transactedSend-
-
isDropOnResourceLimit
public boolean isDropOnResourceLimit()
-
setDropOnResourceLimit
public void setDropOnResourceLimit(boolean dropOnResourceLimit)
-
isSetOriginalDestination
public boolean isSetOriginalDestination()
-
setSetOriginalDestination
public void setSetOriginalDestination(boolean setOriginalDestination)
-
-