com.ricebridge.xmlman
Class BadRecordListenerSupport

java.lang.Object
  extended bycom.ricebridge.xmlman.BadRecordListenerSupport
All Implemented Interfaces:
BadRecordListener
Direct Known Subclasses:
CollectingBadRecordListener

public abstract class BadRecordListenerSupport
extends Object
implements BadRecordListener

Helper class for implementing the BadRecordListener interface.

Use of this class will help ensure future compatibility with any XML Manager API changes. Subclasses should implement the *Impl methods (for example, handleBadRecordImpl(BadRecord)) rather than the declared interface methods such as handleBadRecord(BadRecord). See the BadRecordListener interface documentation for a description of the calling sequence of the methods in this class.

Note: you should probably extend the abstract CollectingBadRecordListener class, instead of this class, to ensure that the getBadRecords method continues to function correctly.

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


Constructor Summary
BadRecordListenerSupport()
           
 
Method Summary
 void endProcess()
          Helper implementation of BadRecordListener.endProcess.
protected  void endProcessImpl()
          Implement this method to receive notification that the processing of XML data has finished.
 void handleBadRecord(BadRecord pBadRecord)
          Helper implementation of BadRecordListener.handleBadRecord.
protected abstract  void handleBadRecordImpl(BadRecord pBadRecord)
          Implement this method to receive each BadRecord as it occurs.
 void startProcess()
          Helper implementation of BadRecordListener.startProcess.
protected  void startProcessImpl()
          Implement this method to receive notification that the processing of XML data is about to start.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BadRecordListenerSupport

public BadRecordListenerSupport()
Method Detail

startProcess

public void startProcess()
Helper implementation of BadRecordListener.startProcess. Subclasses should implement startProcessImpl().

Specified by:
startProcess in interface BadRecordListener

handleBadRecord

public void handleBadRecord(BadRecord pBadRecord)
Helper implementation of BadRecordListener.handleBadRecord. Subclasses should implement handleBadRecordImpl(BadRecord).

Specified by:
handleBadRecord in interface BadRecordListener
Parameters:
pBadRecord - BadRecord object describing the error

endProcess

public void endProcess()
Helper implementation of BadRecordListener.endProcess. Subclasses should implement endProcessImpl().

Specified by:
endProcess in interface BadRecordListener

startProcessImpl

protected void startProcessImpl()
Implement this method to receive notification that the processing of XML data is about to start.

This method is optional for subclasses, as an empty implementation is provided here.

See Also:
startProcess(), BadRecordListener.startProcess()

handleBadRecordImpl

protected abstract void handleBadRecordImpl(BadRecord pBadRecord)
Implement this method to receive each BadRecord as it occurs.

This method must be implemented by subclasses.

See Also:
handleBadRecord(BadRecord), BadRecordListener.handleBadRecord(BadRecord)

endProcessImpl

protected void endProcessImpl()
Implement this method to receive notification that the processing of XML data has finished.

This method is optional for subclasses, as an empty implementation is provided here.

See Also:
endProcess(), BadRecordListener.endProcess()


Copyright © 2004-2005 Ricebridge