public abstract class EITransport extends java.lang.Object implements DCTransport, DataProviderIfc, FileDataProviderIfc
| Modifier and Type | Field and Description |
|---|---|
protected DataReceiverIfc |
dataReceiver
Reference to the DataReceiver of the transport.
|
boolean |
fdChecked |
protected FileDataReceiverIfc |
filedataReceiver
Reference to the FileDataReceiver of the transport.
|
FileEIDuplicateCheck |
fileduplicateCheck |
protected java.io.File |
fileToProcess |
protected InputStatisticsMonitorIfc |
inputCount
Input record count object.
|
java.io.File |
lockFile |
protected boolean |
movedFile |
protected DCNode |
node
Reference to the
EINode to which the transport is
associated. |
protected long |
pollingInterval
Time interval at which the node will check for data.
|
protected boolean |
processing |
protected boolean |
processingData |
protected boolean |
running
Indicates whether the transport is running.
|
| Constructor and Description |
|---|
EITransport() |
| Modifier and Type | Method and Description |
|---|---|
abstract DCFieldContainer[] |
getBulkData()
This method is used by the DataReceiver to fetch a set of
DCFieldContainer objects.
|
abstract DCFieldContainer |
getData()
This method is used by the DataReceiver to fetch a single
|
DataReceiverIfc |
getDataReceiver()
Gets the object that is retrieving data from this DataProvider
|
FileEIDuplicateCheck |
getDubCheckObj() |
boolean |
getDupCheckFlag() |
DCFieldContainer[] |
getFileBulkData()
This method is used by the FileDataReceiver to fetch a set of
This is just a dummy implementation, any transport needing the file level transaction behavior should override this method
and implement correct behavior.
|
DCFieldContainer |
getFileData()
This method is used by the FileDataReceiver to fetch a single
This is just a dummy implementation, any transport needing the file level transaction behavior should override this method
and implement correct behavior.
|
FileDataReceiverIfc |
getFileDataReceiver()
Gets the object that is retrieving data from this FileDataProvider
|
boolean |
getMovedFileStatus() |
DCNode |
getNode()
Returns the
EINode containing this transport. |
long |
getPollingInterval()
Returns the time interval between polls for available data.
|
void |
handleRejectOfFile()
To handle the remaining input files when there is reject of a file
|
protected void |
incrementIn() |
protected void |
incrementIn(int count) |
abstract boolean |
isDataAvailable()
This method is used by the DataReceiver to ask this provider if
data is available.
|
boolean |
isEndOfFile()
Determines if record received is an End of file indication
This is just a dummy implementation, any transport needing the file level transaction behavior should override this method
and implement correct behavior.
|
boolean |
isFileDataAvailable()
This method is used by the FileDataReceiver to ask this provider if
data is available.
|
boolean |
isHealthy()
This method is used to check the transport's state of health.
|
boolean |
isProcessing() |
boolean |
isProcessingData() |
boolean |
isStartOfFile()
Determines if the record received is start of file indication
This is just a dummy implementation, any transport needing the file level transaction behavior should override this method
and implement correct behavior.
|
java.lang.String |
openInputFile()
This is just a dummy implementation, any transport needing the file level transaction behavior should override this method
and implement correct behavior.
|
boolean |
rejectFile()
This is just a dummy implementation, any transport needing the file level transaction behavior should override this method
and implement correct behavior.
|
abstract void |
run()
This method is used to control processing for fetching data from
the EI's source.
|
protected void |
setCountsSuspect()
Set a flag to indicate to the Record Statistics feature that there is
something not trusted in the input counts.
|
void |
setDataReceiver(DataReceiverIfc receiver)
Sets the object to which this DataProvider will send
its data.
|
void |
setFileDataReceiver(FileDataReceiverIfc receiver)
Sets the object to which this FileDataProvider will send
its data.
|
void |
setFileToProcess(java.io.File filetoProcess) |
void |
setMovedFileStatus(boolean fileMoved) |
void |
setNode(DCNode einode)
Sets the node within which this
EITransport is contained. |
void |
setPollingInterval(long interval)
Sets the time interval between polls for available data.
|
void |
setProcessing(boolean isProcessing) |
abstract void |
shutdown()
This method is used to provide a means of shutting down the transport
in an orderly fashion.
|
protected DCNode node
EINode to which the transport is
associated.protected DataReceiverIfc dataReceiver
protected FileDataReceiverIfc filedataReceiver
protected boolean running
protected boolean processing
protected boolean movedFile
protected long pollingInterval
protected InputStatisticsMonitorIfc inputCount
protected boolean processingData
protected java.io.File fileToProcess
public java.io.File lockFile
public boolean fdChecked
public FileEIDuplicateCheck fileduplicateCheck
public void setDataReceiver(DataReceiverIfc receiver)
setDataReceiver in interface DataProviderIfcreceiver - Object which needs data sent to it.public void setFileDataReceiver(FileDataReceiverIfc receiver)
setFileDataReceiver in interface FileDataProviderIfcreceiver - Object which needs data sent to it.public DataReceiverIfc getDataReceiver()
DataProviderIfcgetDataReceiver in interface DataProviderIfcpublic FileDataReceiverIfc getFileDataReceiver()
FileDataProviderIfcgetFileDataReceiver in interface FileDataProviderIfcpublic abstract boolean isDataAvailable()
isDataAvailable in interface DataProviderIfctrue, if data is availablepublic boolean isFileDataAvailable()
isFileDataAvailable in interface FileDataProviderIfctrue, if data is availablepublic abstract DCFieldContainer getData()
getData in interface DataProviderIfcpublic DCFieldContainer getFileData()
getFileData in interface FileDataProviderIfcpublic boolean isEndOfFile()
isEndOfFile in interface FileDataProviderIfctrue, if data is availablepublic boolean isStartOfFile()
isStartOfFile in interface FileDataProviderIfcpublic abstract DCFieldContainer[] getBulkData()
getBulkData in interface DataProviderIfcpublic DCFieldContainer[] getFileBulkData()
getFileBulkData in interface FileDataProviderIfcpublic abstract void run()
run in interface java.lang.Runnablepublic abstract void shutdown()
shutdown in interface DCTransportpublic void setNode(DCNode einode)
EITransport is contained.einode - The EINode which contains this transport.public DCNode getNode()
EINode containing this transport.EINode of this transport.public void setPollingInterval(long interval)
interval - Number of milliseconds to wait.public long getPollingInterval()
public boolean isHealthy()
isHealthy in interface DCTransportprotected void incrementIn()
protected void incrementIn(int count)
protected void setCountsSuspect()
public boolean isProcessingData()
public void setFileToProcess(java.io.File filetoProcess)
public boolean isProcessing()
public void setProcessing(boolean isProcessing)
public boolean getMovedFileStatus()
public void setMovedFileStatus(boolean fileMoved)
public java.lang.String openInputFile()
throws java.lang.Exception
openInputFile in interface FileDataProviderIfcjava.lang.Exceptionpublic boolean rejectFile()
throws java.lang.Exception
rejectFile in interface FileDataProviderIfc true for successful rejection of input filejava.lang.Exceptionpublic void handleRejectOfFile()
FileDataProviderIfchandleRejectOfFile in interface FileDataProviderIfcpublic boolean getDupCheckFlag()
public FileEIDuplicateCheck getDubCheckObj()