Class AmqMessagesQueryFilter
- java.lang.Object
-
- org.apache.activemq.console.filter.AbstractQueryFilter
-
- org.apache.activemq.console.filter.AmqMessagesQueryFilter
-
- All Implemented Interfaces:
QueryFilter
public class AmqMessagesQueryFilter extends AbstractQueryFilter
-
-
Field Summary
-
Fields inherited from class org.apache.activemq.console.filter.AbstractQueryFilter
next
-
Fields inherited from interface org.apache.activemq.console.filter.QueryFilter
QUERY_DELIMETER
-
-
Constructor Summary
Constructors Constructor Description AmqMessagesQueryFilter(URI brokerUrl, Destination destination)
Create a JMS message query filterAmqMessagesQueryFilter(ConnectionFactory connectionFactory, Destination destination)
Create a JMS message query filter
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Connection
createConnection()
Create and start a JMS connectionURI
getBrokerUrl()
Get the broker url being used.Destination
getDestination()
Get the destination being used.List
query(List queries)
Queries the specified destination using the message selector format queryprotected List
queryMessages(ActiveMQQueue queue, String selector)
Query the messages of a queue destination using a queue browserprotected List
queryMessages(ActiveMQTopic topic, String selector)
Query the messages of a topic destination using a message consumervoid
setBrokerUrl(URI brokerUrl)
Set the broker url to use.void
setDestination(Destination destination)
Set the destination to use.-
Methods inherited from class org.apache.activemq.console.filter.AbstractQueryFilter
query
-
-
-
-
Constructor Detail
-
AmqMessagesQueryFilter
public AmqMessagesQueryFilter(URI brokerUrl, Destination destination)
Create a JMS message query filter- Parameters:
brokerUrl
- - broker url to connect todestination
- - JMS destination to query
-
AmqMessagesQueryFilter
public AmqMessagesQueryFilter(ConnectionFactory connectionFactory, Destination destination)
Create a JMS message query filter- Parameters:
connectionFactory
- - to connect withdestination
- - JMS destination to query
-
-
Method Detail
-
query
public List query(List queries) throws Exception
Queries the specified destination using the message selector format query- Parameters:
queries
- - message selector queries- Returns:
- list messages that matches the selector
- Throws:
Exception
-
queryMessages
protected List queryMessages(ActiveMQQueue queue, String selector) throws Exception
Query the messages of a queue destination using a queue browser- Parameters:
queue
- - queue destinationselector
- - message selector- Returns:
- list of messages that matches the selector
- Throws:
Exception
-
queryMessages
protected List queryMessages(ActiveMQTopic topic, String selector) throws Exception
Query the messages of a topic destination using a message consumer- Parameters:
topic
- - topic destinationselector
- - message selector- Returns:
- list of messages that matches the selector
- Throws:
Exception
-
createConnection
protected Connection createConnection() throws JMSException
Create and start a JMS connection- Returns:
- JMS connection
- Throws:
JMSException
-
getBrokerUrl
public URI getBrokerUrl()
Get the broker url being used.- Returns:
- broker url
-
setBrokerUrl
public void setBrokerUrl(URI brokerUrl)
Set the broker url to use.- Parameters:
brokerUrl
- - broker url
-
getDestination
public Destination getDestination()
Get the destination being used.- Returns:
- - JMS destination
-
setDestination
public void setDestination(Destination destination)
Set the destination to use.- Parameters:
destination
- - JMS destination
-
-