org.apache.activemq.store.amq.reader
Class AMQReader

java.lang.Object
  extended by org.apache.activemq.store.amq.reader.AMQReader
All Implemented Interfaces:
Iterable<Message>

public class AMQReader
extends Object
implements Iterable<Message>

Reads and iterates through data log files for the AMQMessage Store


Constructor Summary
AMQReader(File file)
          Create the AMQReader to read a directory of amq data logs - or an individual data log file
AMQReader(File file, String selector)
          Create the AMQReader to read a directory of amq data logs - or an individual data log file
 
Method Summary
protected  org.apache.activemq.store.amq.reader.MessageLocation getNextMessage(org.apache.activemq.store.amq.reader.MessageLocation lastLocation)
           
 Iterator<Message> iterator()
           
static Set<File> listDataFiles(File directory)
          List all the data files in a directory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AMQReader

public AMQReader(File file)
          throws InvalidSelectorException,
                 IOException
Create the AMQReader to read a directory of amq data logs - or an individual data log file

Parameters:
file - the directory - or file
Throws:
IOException
InvalidSelectorException
IOException
InvalidSelectorException

AMQReader

public AMQReader(File file,
                 String selector)
          throws IOException,
                 InvalidSelectorException
Create the AMQReader to read a directory of amq data logs - or an individual data log file

Parameters:
file - the directory - or file
selector - the JMS selector or null to select all
Throws:
IOException
InvalidSelectorException
Method Detail

listDataFiles

public static Set<File> listDataFiles(File directory)
                               throws IOException
List all the data files in a directory

Parameters:
directory -
Returns:
Throws:
IOException

iterator

public Iterator<Message> iterator()
Specified by:
iterator in interface Iterable<Message>

getNextMessage

protected org.apache.activemq.store.amq.reader.MessageLocation getNextMessage(org.apache.activemq.store.amq.reader.MessageLocation lastLocation)
                                                                       throws IllegalStateException,
                                                                              IOException
Throws:
IllegalStateException
IOException


Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.