2.17.2: 2011-06-17

net.sf.basedb.util.importer.spotdata
Class BfsImporter.ProgressEventHandler

java.lang.Object
  extended by net.sf.basedb.util.importer.spotdata.BfsImporter.ProgressEventHandler
All Implemented Interfaces:
EventHandler
Enclosing class:
BfsImporter

static class BfsImporter.ProgressEventHandler
extends Object
implements EventHandler


Field Summary
private  long nextReport
           
private  ProgressReporter progress
           
private  long reportInterval
           
private  long totalBytes
           
 
Constructor Summary
BfsImporter.ProgressEventHandler(ProgressReporter progress, long totalBytes)
           
 
Method Summary
 void handleEvent(EventType eventType, Object eventData, BfsParser parser)
          The method is called by the parser when it has found something interesting in a BFS file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

progress

private ProgressReporter progress

totalBytes

private long totalBytes

nextReport

private long nextReport

reportInterval

private long reportInterval
Constructor Detail

BfsImporter.ProgressEventHandler

BfsImporter.ProgressEventHandler(ProgressReporter progress,
                                 long totalBytes)
Method Detail

handleEvent

public void handleEvent(EventType eventType,
                        Object eventData,
                        BfsParser parser)
Description copied from interface: EventHandler
The method is called by the parser when it has found something interesting in a BFS file. See the respective parser documentation for documentation about the events that it generates. There is usually some kind of information associated with the event. This information is sent to the event handler as an object. The parser should document what kind of information it sends so that event handler implementation can react and use the information.

It is recommended that event handlers ignore event types they don't know about.

Specified by:
handleEvent in interface EventHandler
Parameters:
eventType - The type of event. See the parser documentation for more information about the event types it generates
eventData - The data that is associated with the event
parser - The parser that is resposible for parsing the file

2.17.2: 2011-06-17