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 void
create(Broker broker, ConnectionContext context, ActiveMQDestination destination)
boolean
equals(Object obj)
ActiveMQDestination
getMappedDestinations()
Returns mapped destination(s)String
getName()
String
getPostfix()
String
getPrefix()
ActiveMQDestination
getVirtualDestination()
Returns the virtual destinationint
hashCode()
Destination
intercept(Destination destination)
Creates a virtual destination from the physical destinationDestination
interceptMappedDestination(Destination destination)
Creates a mapped destinationboolean
isConcurrentSend()
boolean
isDropOnResourceLimit()
boolean
isLocal()
boolean
isSelectorAware()
boolean
isSetOriginalDestination()
boolean
isTransactedSend()
void
remove(Destination destination)
void
setConcurrentSend(boolean concurrentSend)
When true, dispatch to matching destinations in parallel (in multiple threads)void
setDropOnResourceLimit(boolean dropOnResourceLimit)
void
setLocal(boolean local)
void
setName(String name)
void
setPostfix(String postfix)
Sets any postix used to identify the queue consumersvoid
setPrefix(String prefix)
Sets the prefix wildcard used to identify the queue consumers for a given topicvoid
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.void
setSetOriginalDestination(boolean setOriginalDestination)
void
setTransactedSend(boolean transactedSend)
When true, dispatch to matching destinations always uses a transaction.String
toString()
-
-
-
Method Detail
-
getVirtualDestination
public ActiveMQDestination getVirtualDestination()
Description copied from interface:VirtualDestination
Returns the virtual destination- Specified by:
getVirtualDestination
in interfaceVirtualDestination
-
intercept
public Destination intercept(Destination destination)
Description copied from interface:VirtualDestination
Creates a virtual destination from the physical destination- Specified by:
intercept
in interfaceDestinationInterceptor
- Specified by:
intercept
in interfaceVirtualDestination
-
getMappedDestinations
public ActiveMQDestination getMappedDestinations()
Description copied from interface:VirtualDestination
Returns mapped destination(s)- Specified by:
getMappedDestinations
in interfaceVirtualDestination
-
interceptMappedDestination
public Destination interceptMappedDestination(Destination destination)
Description copied from interface:VirtualDestination
Creates a mapped destination- Specified by:
interceptMappedDestination
in interfaceVirtualDestination
-
create
public void create(Broker broker, ConnectionContext context, ActiveMQDestination destination) throws Exception
- Specified by:
create
in interfaceDestinationInterceptor
- Throws:
Exception
-
remove
public void remove(Destination destination)
- Specified by:
remove
in 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)
-
-