org.apache.activemq.console.filter
Class AmqMessagesQueryFilter

java.lang.Object
  extended by org.apache.activemq.console.filter.AbstractQueryFilter
      extended by 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
AmqMessagesQueryFilter(ConnectionFactory connectionFactory, Destination destination)
          Create a JMS message query filter
AmqMessagesQueryFilter(URI brokerUrl, Destination destination)
          Create a JMS message query filter
 
Method Summary
protected  Connection createConnection()
          Create and start a JMS connection
 URI 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 query
protected  List queryMessages(ActiveMQQueue queue, String selector)
          Query the messages of a queue destination using a queue browser
protected  List queryMessages(ActiveMQTopic topic, String selector)
          Query the messages of a topic destination using a message consumer
 void 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AmqMessagesQueryFilter

public AmqMessagesQueryFilter(URI brokerUrl,
                              Destination destination)
Create a JMS message query filter

Parameters:
brokerUrl - - broker url to connect to
destination - - JMS destination to query

AmqMessagesQueryFilter

public AmqMessagesQueryFilter(ConnectionFactory connectionFactory,
                              Destination destination)
Create a JMS message query filter

Parameters:
brokerUrl - - broker url to connect to
destination - - 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 destination
selector - - 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 destination
selector - - 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


Copyright © 2005–2013 The Apache Software Foundation. All rights reserved.