Package com.nt.udc.oi.node.narxml
Class NARXMLOIFileWriter
java.lang.Object
com.nt.udc.ndk.util.OIFileWriter
com.nt.udc.oi.node.narxml.NARXMLOIFileWriter
- All Implemented Interfaces:
StateBufferSaveable
-
Field Summary
Fields inherited from class com.nt.udc.ndk.util.OIFileWriter
fileWriter, m_stateManagementIfc, MAXRECSPERFILE, MAXRECSPERFILE_DEFAULT, MAXRECSPERFILE_MAX, MAXRECSPERFILE_MIN
-
Constructor Summary
ConstructorsConstructorDescriptionNARXMLOIFileWriter
(LoggerIfc lgr, String filedir, String filename, String currext, String doneext, String timeper, StateManagementIfc stateMgr, int maxrecs, String schemaURL) Construct a newOIFileWriter
to be used within anOITransport
object. -
Method Summary
Methods inherited from class com.nt.udc.ndk.util.OIFileWriter
cycleFile, cycleOldFiles, 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
-
Constructor Details
-
NARXMLOIFileWriter
public NARXMLOIFileWriter(LoggerIfc lgr, String filedir, String filename, String currext, String doneext, String timeper, StateManagementIfc stateMgr, int maxrecs, String schemaURL) throws NodeStartException Construct a newOIFileWriter
to be used within anOITransport
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.- Parameters:
filedir
- 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 locationlogger
- Reference to the log methods of the node- Throws:
NodeStartException
-
-
Method Details
-
write
- Overrides:
write
in classOIFileWriter
- Throws:
IOException
-
open
Description copied from class:OIFileWriter
Open the output file, creating it if necessary. The name and location of the file is determined thru configuration parameters at the time of the creation of the OINode.- Overrides:
open
in classOIFileWriter
- Returns:
true
, if it was necessary to create the file.- Throws:
IOException
-
close
Description copied from class:OIFileWriter
Close the output file.- Overrides:
close
in classOIFileWriter
- Throws:
IOException
-