Package org.apache.activemq.store
Class PersistenceAdapterSupport
- java.lang.Object
-
- org.apache.activemq.store.PersistenceAdapterSupport
-
public class PersistenceAdapterSupport extends Object
Used to implement common PersistenceAdapter methods.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
PersistenceAdapterSupport.DestinationMatcher
Provides an interface for a Destination matching object that can be used to search for specific destinations from a persistence adapter.
-
Constructor Summary
Constructors Constructor Description PersistenceAdapterSupport()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<ActiveMQQueue>
listQueues(PersistenceAdapter adapter)
Provides a means of querying the persistence adapter for a list of ActiveMQQueue instances.static List<ActiveMQQueue>
listQueues(PersistenceAdapter adapter, PersistenceAdapterSupport.DestinationMatcher matcher)
Provides a means of querying the persistence adapter for a list of ActiveMQQueue instances that match some given search criteria.static List<SubscriptionInfo>
listSubscriptions(PersistenceAdapter adapter, String clientId)
Searches the set of subscriptions from the given persistence adapter and returns all those that belong to the given ClientId value.static List<ActiveMQTopic>
listTopics(PersistenceAdapter adapter)
Provides a means of querying the persistence adapter for a list of ActiveMQTopic instances.static List<ActiveMQTopic>
listTopics(PersistenceAdapter adapter, PersistenceAdapterSupport.DestinationMatcher matcher)
Provides a means of querying the persistence adapter for a list of ActiveMQTopic instances that match some given search criteria.
-
-
-
Method Detail
-
listSubscriptions
public static List<SubscriptionInfo> listSubscriptions(PersistenceAdapter adapter, String clientId) throws IOException
Searches the set of subscriptions from the given persistence adapter and returns all those that belong to the given ClientId value.- Parameters:
adapter
- the persistence adapter instance to search within.clientId
- the client ID value used to filter the subscription set.- Returns:
- a list of all subscriptions belonging to the given client.
- Throws:
IOException
- if an error occurs while listing the stored subscriptions.
-
listQueues
public static List<ActiveMQQueue> listQueues(PersistenceAdapter adapter) throws IOException
Provides a means of querying the persistence adapter for a list of ActiveMQQueue instances.- Parameters:
adapter
- the persistence adapter instance to query.- Returns:
- a List
with all the queue destinations. - Throws:
IOException
- if an error occurs while reading the destinations.
-
listQueues
public static List<ActiveMQQueue> listQueues(PersistenceAdapter adapter, PersistenceAdapterSupport.DestinationMatcher matcher) throws IOException
Provides a means of querying the persistence adapter for a list of ActiveMQQueue instances that match some given search criteria.- Parameters:
adapter
- the persistence adapter instance to query.matcher
- the DestinationMatcher instance used to find the target destinations.- Returns:
- a List
with all the matching destinations. - Throws:
IOException
- if an error occurs while reading the destinations.
-
listTopics
public static List<ActiveMQTopic> listTopics(PersistenceAdapter adapter) throws IOException
Provides a means of querying the persistence adapter for a list of ActiveMQTopic instances.- Parameters:
adapter
- the persistence adapter instance to query.- Returns:
- a List
with all the topic destinations. - Throws:
IOException
- if an error occurs while reading the destinations.
-
listTopics
public static List<ActiveMQTopic> listTopics(PersistenceAdapter adapter, PersistenceAdapterSupport.DestinationMatcher matcher) throws IOException
Provides a means of querying the persistence adapter for a list of ActiveMQTopic instances that match some given search criteria.- Parameters:
adapter
- the persistence adapter instance to query.matcher
- the DestinationMatcher instance used to find the target destinations.- Returns:
- a List
with all the matching destinations. - Throws:
IOException
- if an error occurs while reading the destinations.
-
-