Package com.nt.udc.ei.node.xml
Class XMLTransport
java.lang.Object
com.nt.udc.ndk.node.EITransport
com.nt.udc.ei.node.xml.XMLTransport
- All Implemented Interfaces:
DataProviderIfc
,DCTransport
,FileDataProviderIfc
,Runnable
- Direct Known Subclasses:
XMLFileTransport
This is the parent class for transport types used by XML.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ConfigIfc
This field is used to get configuration information.protected int
This member is used for debugging.protected FilenameFilter
This member is used to select the files to process.protected LoggerIfc
This field is used to log errors.protected IStreamSource
This member is used to provide the data input stream.protected XMLProcessor
protected COSARReporter
This member is used to send reports to.protected File
Fields inherited from class com.nt.udc.ndk.node.EITransport
dataReceiver, fdChecked, filedataReceiver, fileduplicateCheck, fileToProcess, inputCount, lockFile, movedFile, node, pollingInterval, processing, processingData, running
-
Constructor Summary
ConstructorsConstructorDescriptionXMLTransport
(LoggerIfc logger, ConfigIfc config, File scratchDir) Construct a new XMLTransport to be used within the specified EINode. -
Method Summary
Modifier and TypeMethodDescriptionThis method is used by the DataReceiver to fetch several DCFieldContainer objects.getData()
This method is used by the DataReceiver to fetch a single DCFieldContainer.protected void
This function is used to initialize the filename filtervoid
This function is used to create and initialize the Transport's components.protected abstract void
This is to be implemented by subclasses for various transportation types.boolean
This method is used by the DataReceiver to ask this provider if data is available.void
run()
This method is used when the EITransport runs within its own thread.void
setProcessor
(XMLProcessor processor) void
shutdown()
Stop the transport.Methods inherited from class com.nt.udc.ndk.node.EITransport
getCurrArchFile, getData, getDataReceiver, getDubCheckObj, getDupCheckFlag, getFileBulkData, getFileData, getFileDataReceiver, getFileList, getMovedFileStatus, getNode, getPollingInterval, getProcessedArchFile, handleRejectOfFile, incrementIn, incrementIn, isEndOfFile, isFileDataAvailable, isHealthy, isProcessing, isProcessingData, isStartOfFile, moveCurrentFileToBackUp, openInputFile, rejectFile, removeProcessedFile, setCountsSuspect, setDataReceiver, setFileDataReceiver, setFileToProcess, setMovedFileStatus, setNode, setPollingInterval, setProcessedArchFile, setProcessing, signalBatchCompletion, validOIMinorType
-
Field Details
-
m_debugLevel
protected int m_debugLevelThis member is used for debugging. -
m_iStreamSource
This member is used to provide the data input stream. -
m_iFilenameFilter
This member is used to select the files to process. -
m_reporter
This member is used to send reports to. -
m_iLogger
This field is used to log errors. -
m_config
This field is used to get configuration information. -
m_scratchDir
-
m_processor
-
-
Constructor Details
-
XMLTransport
Construct a new XMLTransport to be used within the specified EINode.- Throws:
Exception
-
-
Method Details
-
isDataAvailable
public boolean isDataAvailable()This method is used by the DataReceiver to ask this provider if data is available.- Specified by:
isDataAvailable
in interfaceDataProviderIfc
- Specified by:
isDataAvailable
in classEITransport
- Returns:
true
, if data is available
-
getData
This method is used by the DataReceiver to fetch a single DCFieldContainer.- Specified by:
getData
in interfaceDataProviderIfc
- Specified by:
getData
in classEITransport
- Returns:
- DCFieldContainer.
-
getBulkData
This method is used by the DataReceiver to fetch several DCFieldContainer objects.- Specified by:
getBulkData
in interfaceDataProviderIfc
- Specified by:
getBulkData
in classEITransport
- Returns:
- DCFieldContainer object array, containing the data that is for processing
-
setProcessor
-
run
public void run()This method is used when the EITransport runs within its own thread. The method should contain the logic to retrieve the data from the the transport's data source and to generate the DCFieldContainer() objects that will be passed on to the DataReceiver.- Specified by:
run
in interfaceRunnable
- Specified by:
run
in classEITransport
-
shutdown
public void shutdown()Stop the transport. To ensure no loss of data, the transport should continue to supply any queued data to its DataReceiver.- Specified by:
shutdown
in interfaceDCTransport
- Specified by:
shutdown
in classEITransport
-
initialize
This function is used to create and initialize the Transport's components.- Throws:
Exception
-
initFilenameFilter
This function is used to initialize the filename filter- Throws:
Exception
-
initStreamSource
This is to be implemented by subclasses for various transportation types.- Throws:
Exception
-