public class TcpEITransport extends EITransport
QueuedTcpPacket object and stored in a queue until
the transport's DataReceiver requests data via the getData()
or getBulkData() method. At that time, a
QueuedTcpPacket is popped off the queue and given to the
transport's DCRecordFactoryIfc object via the factory's
getRecords() method. The DCFieldContainer
objects returned from the factory will then be supplied to the DataReceiver.dataReceiver, fdChecked, filedataReceiver, fileduplicateCheck, fileToProcess, inputCount, lockFile, movedFile, node, pollingInterval, processing, processingData, running| Constructor and Description |
|---|
TcpEITransport(EINode einode,
DCRecordFactoryIfc factory,
java.lang.String host,
int prt)
Construct a new TcpEITransport to be used within the specified EINode.
|
TcpEITransport(EINode einode,
DCRecordFactoryIfc factory,
java.lang.String host,
int prt,
int pktSize,
int qSize)
Construct a new TcpEITransport to be used within the specified EINode.
|
| Modifier and Type | Method and Description |
|---|---|
DCFieldContainer[] |
getBulkData()
This method is used by the DataReceiver to fetch a set
of DCFieldContainers.
|
DCFieldContainer |
getData()
This method is used by the DataReceiver to fetch a single
DCFieldContainer.
|
boolean |
isDataAvailable()
This method is used by the DataReceiver to ask this provider if
data is available.
|
boolean |
isHealthy()
This method is used to check if the transport is fully functional.
|
boolean |
isShutdownOnError()
Indicates whether transport should shutdown upon processing error
|
void |
run()
This method is used when the EITransport runs within its own thread.
|
void |
setShutdownOnError(boolean flag)
Indicates whether transport should shutdown upon processing error
|
void |
shutdown()
Stop the transport.
|
getDataReceiver, getDubCheckObj, getDupCheckFlag, getFileBulkData, getFileData, getFileDataReceiver, getMovedFileStatus, getNode, getPollingInterval, handleRejectOfFile, incrementIn, incrementIn, isEndOfFile, isFileDataAvailable, isProcessing, isProcessingData, isStartOfFile, openInputFile, rejectFile, setCountsSuspect, setDataReceiver, setFileDataReceiver, setFileToProcess, setMovedFileStatus, setNode, setPollingInterval, setProcessingpublic TcpEITransport(EINode einode, DCRecordFactoryIfc factory, java.lang.String host, int prt) throws NodeStartException
einode - Reference to the EINode containing the transportfactory - DCRecordFactoryIfc() object used to generate the
desired EIRecord() objects.host - The host name / IP address to listen toport - The port number to listen onNodeStartExceptionpublic TcpEITransport(EINode einode, DCRecordFactoryIfc factory, java.lang.String host, int prt, int pktSize, int qSize) throws NodeStartException
einode - Reference to the EINode containing the transportfactory - DCRecordFactoryIfc() object used to generate the
desired EIRecord() objects.host - The host name / IP address to listen toport - The port number to listen onpktSize - The number of bytes in an incoming data 'packet'qSize - The maximum number of 'packets' allowed in the queueNodeStartExceptionpublic boolean isDataAvailable()
isDataAvailable in interface DataProviderIfcisDataAvailable in class EITransporttrue, if data is availablepublic DCFieldContainer getData()
getData in interface DataProviderIfcgetData in class EITransportpublic DCFieldContainer[] getBulkData()
getBulkData in interface DataProviderIfcgetBulkData in class EITransportpublic void run()
QueuedTcpPacket object and stored in a queue
until the data is requested by the transport's DataReceiver.run in interface java.lang.Runnablerun in class EITransportpublic void shutdown()
shutdown in interface DCTransportshutdown in class EITransportpublic boolean isShutdownOnError()
public void setShutdownOnError(boolean flag)
flag - true, if error should cause a shutdown.
Default is false.public boolean isHealthy()
isHealthy in interface DCTransportisHealthy in class EITransport