public class NARXMLOIFileWriter extends OIFileWriter
fileWriter, m_stateManagementIfc, MAXRECSPERFILE, MAXRECSPERFILE_DEFAULT, MAXRECSPERFILE_MAX, MAXRECSPERFILE_MIN
Constructor and Description |
---|
NARXMLOIFileWriter(LoggerIfc lgr,
java.lang.String filedir,
java.lang.String filename,
java.lang.String currext,
java.lang.String doneext,
java.lang.String timeper,
StateManagementIfc stateMgr,
int maxrecs,
java.lang.String schemaURL)
Construct a new
OIFileWriter to be used within an
OITransport object. |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the output file.
|
boolean |
open()
Open the output file, creating it if necessary.
|
void |
write(NAR nar) |
cycleFile, flush, getActiveExtension, getBufferSize, getCompletedExtension, getCurrentFileExpiryTime, getCycleTime, getFileLevelTransactionConfig, getFilename, getFilePrefix, getFullFilename, getLogger, getMaxRecsPerFile, getNewFilename, getNextCycle, getOutDir, getOutFile, getOutputDirectory, getPosition, getRecordCount, getSystemTime, getTimeAmt, incrementRecordCount, isHealthy, isOpen, moveToReadyToCycle, readyToCycle, removeOutFile, renameActiveFile, resetRecordCount, restoreState, saveState, saveStateNotification, setActiveExtension, setBufferSize, setCompletedExtension, setCycleTime, setFileLevelTransactionConfig, setFilePrefix, setMaxRecsPerFile, setMultiThreadConfiguration, setNextCycle, setNextCycleTime, setOpened, setOriginalFileName, setOutFile, setOutputDirectory, setReadyToCycle, shutdown, write, write
public NARXMLOIFileWriter(LoggerIfc lgr, java.lang.String filedir, java.lang.String filename, java.lang.String currext, java.lang.String doneext, java.lang.String timeper, StateManagementIfc stateMgr, int maxrecs, java.lang.String schemaURL) throws NodeStartException
OIFileWriter
to be used within an
OITransport
object. Files will be created based
upon the provided configuration parameters. The writer can be
configured to write the incoming data as Strings or as an array
of bytes.
Additionally, a simple Thread() is started to periodically check
the time period to determine if the output file is ready to be
cycled. When the OITransport() is being shutdown, the shutdown()
method of this file writer should be called to stop this thread.logger
- Reference to the log methods of the nodefiledir
- Name of the output directory in which to write filesfilename
- File name prefix, to be combined with a timestamp
to create a unique file namecurrext
- File name extension which indicates the active filedoneext
- File name extension which indicates files that have
been completedtimeper
- Period of time a file remains active until it is
cycled outstateMgr
- An interface used to manage state recoverymaxrecs
- Maximum number of records per file.schemaURL
- The XML schema name space locationNodeStartException
public void write(NAR nar) throws java.io.IOException
write
in class OIFileWriter
java.io.IOException
public boolean open() throws java.io.IOException
OIFileWriter
open
in class OIFileWriter
true
, if it was necessary to create the file.java.io.IOException
public void close() throws java.io.IOException
OIFileWriter
close
in class OIFileWriter
java.io.IOException