org.codehaus.activemq.filter
Class DestinationMap
java.lang.Object
org.codehaus.activemq.filter.DestinationMap
- public class DestinationMap
- extends Object
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.
- Version:
- $Revision: 1.1 $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ANY_DESCENDENT
protected static final String ANY_DESCENDENT
- See Also:
- Constant Field Values
ANY_CHILD
protected static final String ANY_CHILD
- See Also:
- Constant Field Values
DestinationMap
public DestinationMap()
get
public Set get(ActiveMQDestination key)
- Looks up the value(s) matching the given Destination key. For simple destinations
this is typically a List of one single value, for wildcards or composite destinations this will typically be
a List of matching values.
- Parameters:
key
- the destination to lookup
- Returns:
- a List of matching values or an empty list if there are no matching values.
put
public void put(ActiveMQDestination key,
Object value)
remove
public void remove(ActiveMQDestination key,
Object value)
- Removes the value from the associated destination
findWildcardMatches
protected Set findWildcardMatches(ActiveMQDestination key)
Copyright © 2004-2005 Protique, Ltd.. All Rights Reserved.