public class StreamSourceFileMgr extends java.lang.Object implements IStreamSource
| Modifier and Type | Field and Description |
|---|---|
protected CManagedFile |
m_crtFile
This member represents the file currently being processed.
|
protected static int |
m_debugLevel |
protected CFileMgr |
m_fileMgr
This member is used to manage files to be processed
|
protected LoggerIfc |
m_iLogger
This member is used for reporting errors and warnings.
|
protected COSARReporter |
m_reporter
This member is used to send reports to.
|
| Constructor and Description |
|---|
StreamSourceFileMgr(java.lang.String inputDir,
java.lang.String scratchDir,
java.io.FilenameFilter filter,
LoggerIfc iLogger) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkDir(java.lang.String dir) |
boolean |
cleanupCrtFile() |
COSARReporter |
COSARReporter() |
protected void |
debug(java.lang.String fName,
java.lang.String msg) |
boolean |
end()
Function called to end reading.
|
static int |
getDebugLevel() |
java.io.File |
getRecoveryFile() |
java.lang.String |
getSourceName() |
boolean |
hasMoreData() |
protected boolean |
initFileMgr(java.lang.String inputDir,
java.lang.String scratchDir,
java.io.FilenameFilter filter)
This function initializes the file manager.
|
boolean |
initialize()
This function is used to initialize the data source.
|
java.io.InputStream |
nextStream() |
static void |
setDebugLevel(int debugLevel) |
void |
setDeleteProcessedFiles(boolean doDelete) |
void |
setDoneFilePrefix(java.lang.String prefix) |
void |
setDoneFileSuffix(java.lang.String suffix) |
void |
setReporter(COSARReporter reporter) |
boolean |
start()
Function called to start reading
|
boolean |
terminate()
This function is used to terminate the data source.
|
protected static int m_debugLevel
protected LoggerIfc m_iLogger
protected CFileMgr m_fileMgr
protected CManagedFile m_crtFile
protected COSARReporter m_reporter
public StreamSourceFileMgr(java.lang.String inputDir,
java.lang.String scratchDir,
java.io.FilenameFilter filter,
LoggerIfc iLogger)
throws java.lang.Exception
inputDir - - directory to monitor for input filesscratchDir - - scratch directoryfilter - - identifies files to returniLogger - - object to handle errors and warningsjava.lang.Exceptionpublic static int getDebugLevel()
public COSARReporter COSARReporter()
public static void setDebugLevel(int debugLevel)
public void setReporter(COSARReporter reporter)
public void setDoneFilePrefix(java.lang.String prefix)
public void setDoneFileSuffix(java.lang.String suffix)
public void setDeleteProcessedFiles(boolean doDelete)
public java.lang.String getSourceName()
getSourceName in interface IStreamSourcepublic boolean hasMoreData()
hasMoreData in interface IStreamSourcepublic java.io.InputStream nextStream()
nextStream in interface IStreamSourcepublic java.io.File getRecoveryFile()
getRecoveryFile in interface IStreamSourcepublic boolean initialize()
initialize in interface IStreamSourcepublic boolean terminate()
terminate in interface IStreamSourcepublic boolean start()
start in interface IStreamSourcepublic boolean end()
end in interface IStreamSourcepublic boolean cleanupCrtFile()
protected boolean initFileMgr(java.lang.String inputDir,
java.lang.String scratchDir,
java.io.FilenameFilter filter)
protected boolean checkDir(java.lang.String dir)
protected void debug(java.lang.String fName,
java.lang.String msg)