|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.activemq.filter.DestinationMap
public class DestinationMap
A Map-like data structure allowing values to be indexed by
ActiveMQDestination
and retrieved by destination - supporting both *
and > style of wildcard as well as composite destinations.
This class assumes that the index changes rarely but that fast lookup into
the index is required. So this class maintains a pre-calculated index for
destination steps. So looking up the values for "TEST.*" or "*.TEST" will be
pretty fast.
Looking up of a value could return a single value or a List of matching
values if a wildcard or composite destination is used.
Field Summary | |
---|---|
protected static java.lang.String |
ANY_CHILD
|
protected static java.lang.String |
ANY_DESCENDENT
|
Constructor Summary | |
---|---|
DestinationMap()
|
Method Summary | |
---|---|
java.lang.Object |
chooseValue(ActiveMQDestination destination)
Returns the value which matches the given destination or null if there is no matching value. |
protected java.util.Set |
findWildcardMatches(ActiveMQDestination key)
|
java.util.Set |
get(ActiveMQDestination key)
Looks up the value(s) matching the given Destination key. |
protected java.lang.Class |
getEntryClass()
Returns the type of the allowed entries which can be set via the setEntries(List) method. |
int |
getQueueRootChildCount()
|
DestinationMapNode |
getQueueRootNode()
|
protected DestinationMapNode |
getRootNode(ActiveMQDestination key)
Returns the root node for the given destination type |
DestinationMapNode |
getTempQueueRootNode()
|
DestinationMapNode |
getTempTopicRootNode()
|
int |
getTopicRootChildCount()
|
DestinationMapNode |
getTopicRootNode()
|
void |
put(ActiveMQDestination key,
java.lang.Object value)
|
void |
remove(ActiveMQDestination key,
java.lang.Object value)
Removes the value from the associated destination |
java.util.Set |
removeAll(ActiveMQDestination key)
|
protected void |
setEntries(java.util.List entries)
A helper method to allow the destination map to be populated from a dependency injection framework such as Spring |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String ANY_DESCENDENT
protected static final java.lang.String ANY_CHILD
Constructor Detail |
---|
public DestinationMap()
Method Detail |
---|
public java.util.Set get(ActiveMQDestination key)
key
- the destination to lookup
public void put(ActiveMQDestination key, java.lang.Object value)
public void remove(ActiveMQDestination key, java.lang.Object value)
public int getTopicRootChildCount()
public int getQueueRootChildCount()
public DestinationMapNode getQueueRootNode()
public DestinationMapNode getTopicRootNode()
public DestinationMapNode getTempQueueRootNode()
public DestinationMapNode getTempTopicRootNode()
protected void setEntries(java.util.List entries)
protected java.lang.Class getEntryClass()
setEntries(List)
method. This allows derived classes to further
restrict the type of allowed entries to make a type safe destination map
for custom policies.
protected java.util.Set findWildcardMatches(ActiveMQDestination key)
public java.util.Set removeAll(ActiveMQDestination key)
key
-
public java.lang.Object chooseValue(ActiveMQDestination destination)
destination
- the destination to find the value for
protected DestinationMapNode getRootNode(ActiveMQDestination key)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |