Package com.nt.udc.ei.node.ipdr
Class IPDRTransport
java.lang.Object
com.nt.udc.ndk.node.EITransport
com.nt.udc.ei.node.ipdr.IPDRTransport
- All Implemented Interfaces:
DataProviderIfc,DCTransport,FileDataProviderIfc,Runnable
- Direct Known Subclasses:
IPDRFileTransport
This is the parent class for transport types used by IPDR.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ConfigIfcThis field is used to get configuration information.protected intThis member is used for debugging.protected FilenameFilterThis member is used to select the files to process.protected LoggerIfcThis field is used to log errors.protected IStreamSourceThis member is used to provide the data input stream.protected IPDRProcessorprotected COSARReporterThis member is used to send reports to.protected FilelongThis field is for converting SECONDS to MILLISECONDSFields inherited from class com.nt.udc.ndk.node.EITransport
dataReceiver, fdChecked, filedataReceiver, fileduplicateCheck, fileToProcess, inputCount, lockFile, movedFile, node, pollingInterval, processing, processingData, running -
Constructor Summary
ConstructorsConstructorDescriptionIPDRTransport(LoggerIfc logger, ConfigIfc config, File scratchDir) Construct a new IPDRTransport 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 voidThis function is used to initialize the filename filtervoidThis function is used to create and initialize the Transport's components.protected abstract voidThis is to be implemented by subclasses for various transportation types.booleanThis method is used by the DataReceiver to ask this provider if data is available.voidrun()This method is used when the EITransport runs within its own thread.voidsetProcessor(IPDRProcessor processor) voidshutdown()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
-
SECS2MSECS
public long SECS2MSECSThis field is for converting SECONDS to MILLISECONDS
-
-
Constructor Details
-
IPDRTransport
Construct a new IPDRTransport 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:
isDataAvailablein interfaceDataProviderIfc- Specified by:
isDataAvailablein classEITransport- Returns:
true, if data is available
-
getData
This method is used by the DataReceiver to fetch a single DCFieldContainer.- Specified by:
getDatain interfaceDataProviderIfc- Specified by:
getDatain classEITransport- Returns:
- DCFieldContainer.
-
getBulkData
This method is used by the DataReceiver to fetch several DCFieldContainer objects.- Specified by:
getBulkDatain interfaceDataProviderIfc- Specified by:
getBulkDatain 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:
runin interfaceRunnable- Specified by:
runin 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:
shutdownin interfaceDCTransport- Specified by:
shutdownin 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
-