com.ricebridge.xmlman
Class StringArrayRecordListener

java.lang.Object
  extended bycom.ricebridge.xmlman.RecordListenerSupport
      extended bycom.ricebridge.xmlman.StringArrayRecordListener
All Implemented Interfaces:
RecordListener
Direct Known Subclasses:
BackgroundTest.DelayedStringArrayRecordListener, PerformanceTest.MeasureStringArrayRecordListener

public class StringArrayRecordListener
extends RecordListenerSupport

Implementation of RecordListener that stores data records as a List of String[] arrays.

This class is used to implement the load(*,RecordSpec) methods in XmlManager. It simply stores the String[] arrays in an ArrayList.

StringArrayRecordListener is designed to be subclassed. You can change the default implementation by calling the setStringArrayRecordListenerClass method of XmlManagerStore, and providing a subclass of StringArrayRecordListener. XmlManagerStore can be accessed using XmlManager.getXmlManagerStore().

The Source Code of this Java class is available under a BSD-style license.


Field Summary
protected  ArrayList iRecords
          List of String[] arrays containing record data.
 
Fields inherited from class com.ricebridge.xmlman.RecordListenerSupport
iFieldNames
 
Constructor Summary
StringArrayRecordListener()
          Constructor with no parameters required for creating new objects in XmlManagerStore.newStringArrayRecordListener.
 
Method Summary
 List getRecords()
          Get the stored list of data records.
protected  BadRecord handleRecordImpl(String[] pRecord, long pRecordNumber)
          Store the data record String[].
 String toString()
          Return a textual description suitable for debugging.
 
Methods inherited from class com.ricebridge.xmlman.RecordListenerSupport
endProcess, endProcessImpl, handleRecord, setFieldNames, setFieldNamesImpl, setXmlSpec, setXmlSpecImpl, startProcess, startProcessImpl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

iRecords

protected ArrayList iRecords
List of String[] arrays containing record data.

Constructor Detail

StringArrayRecordListener

public StringArrayRecordListener()
Constructor with no parameters required for creating new objects in XmlManagerStore.newStringArrayRecordListener.

Method Detail

getRecords

public List getRecords()
Get the stored list of data records.

Returns:
List of String[] arrays

toString

public String toString()
Return a textual description suitable for debugging.


handleRecordImpl

protected BadRecord handleRecordImpl(String[] pRecord,
                                     long pRecordNumber)
Store the data record String[].

Specified by:
handleRecordImpl in class RecordListenerSupport
Parameters:
pRecord - record data as a String[]
pRecordNumber - current count of records
See Also:
RecordListener.handleRecord(java.lang.String[], long)


Copyright © 2004-2005 Ricebridge