net.sf.filePiper.model
Class StatusHolder

java.lang.Object
  extended by net.sf.filePiper.model.StatusHolder

public class StatusHolder
extends Object

Processor of a file.

Author:
berol

Constructor Summary
StatusHolder()
           
 
Method Summary
protected  void appendCount(long count, String entityName, StringBuilder sb)
           
protected  void appendLineOrByteCount(long bytes, long lines, StringBuilder sb)
           
 void bytesProcessed(long nbrByteProcessed)
          Report that some bytes of the input stream have been processed.
protected  String getAbortedMessage()
           
 long getByteCount()
           
 ExecutionPhase getCurrentPhase()
           
protected  String getDoneMessage()
           
protected  String getErrorMessage()
           
 int getInputFileCount()
           
 long getLineCount()
           
 int getOutputFileCount()
           
protected  String getRunningMessage()
           
protected  String getStartingMessage()
           
 String getStatusMessage()
           
 void inputFileStarted()
          Report that a new input stream is being processed.
 void linesProcessed(long nbrLineProcessed)
          Report that some lines of the input stream have been processed.
 void outputFileStarted()
          Report that a new output stream is being processed.
 void reset(ExecutionPhase newPhase)
           
 void setCurrentPhase(ExecutionPhase newPhase)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatusHolder

public StatusHolder()
Method Detail

reset

public void reset(ExecutionPhase newPhase)

getStatusMessage

public String getStatusMessage()

setCurrentPhase

public void setCurrentPhase(ExecutionPhase newPhase)

inputFileStarted

public void inputFileStarted()
Report that a new input stream is being processed.


outputFileStarted

public void outputFileStarted()
Report that a new output stream is being processed.
Note: the default implementation of getStatusMessage() doesn't use this number. It is present for subclasses that might use it.


linesProcessed

public void linesProcessed(long nbrLineProcessed)
Report that some lines of the input stream have been processed.
Each FileProcessor can choose to work in 'line' or 'byte' unit.

Parameters:
nbrLineProcessed - number of lines that were processed.

bytesProcessed

public void bytesProcessed(long nbrByteProcessed)
Report that some bytes of the input stream have been processed.
Each FileProcessor can choose to work in 'line' or 'byte' unit.

Parameters:
nbrByteProcessed - number of lines that were processed.

getCurrentPhase

public ExecutionPhase getCurrentPhase()

getInputFileCount

public int getInputFileCount()

getOutputFileCount

public int getOutputFileCount()

getLineCount

public long getLineCount()

getByteCount

public long getByteCount()

getStartingMessage

protected String getStartingMessage()

getRunningMessage

protected String getRunningMessage()

getDoneMessage

protected String getDoneMessage()

getAbortedMessage

protected String getAbortedMessage()

getErrorMessage

protected String getErrorMessage()

appendLineOrByteCount

protected void appendLineOrByteCount(long bytes,
                                     long lines,
                                     StringBuilder sb)

appendCount

protected void appendCount(long count,
                           String entityName,
                           StringBuilder sb)


Copyright © 2010. All Rights Reserved.