public class JDBCEITransport extends EITransport implements JDBCEIConfigFieldsIfc, Callback, StateBufferSaveable, StateFreezable
dataReceiver, fdChecked, filedataReceiver, fileduplicateCheck, fileToProcess, inputCount, lockFile, movedFile, node, pollingInterval, processing, processingDataDBTABLE, DELETEROWS, FILTERBYID, FILTERBYTIME, FILTERCOLUMN, FILTERTYPE, ORDERBY, QUERYINTERVAL, RULESFILE, WHEREEXPR, WHEREEXPRCOUNTDBCONNECT, DBPWORD, DBTYPE, DBUSER, ORACLE, ORACONNECT| Constructor and Description |
|---|
JDBCEITransport(EINode node,
JDBCEIRecordFactory rFactory,
JDBCConnectionFactoryIfc cFactory,
java.lang.String query,
int fType,
java.lang.String delete)
Construct a new JDBCEITransport.
|
JDBCEITransport(EINode node,
JDBCEIRecordFactory rFactory,
JDBCConnectionFactoryIfc cFactory,
java.lang.String query,
int fType,
java.lang.String delete,
DataReceiverIfc receiver)
Construct a new JDBCEITransport.
|
| Modifier and Type | Method and Description |
|---|---|
void |
callback()
This method is called when the receiving Object has
performed a certain event, and wants to notify the
implementor that the event has occurred.
|
protected void |
close(boolean commit)
Close the connection to the database.
|
protected java.sql.Connection |
connect()
Attempt to establish the connection with the database.
|
void |
freezeState(Callback freezeCallback)
Used by the StateManager thread to halt the processing while
the state of the node is saved.
|
DCFieldContainer[] |
getBulkData()
Not used, since data is pushed to the DataReceiver.
|
DCFieldContainer |
getData()
Not used, since data is pushed to the DataReceiver.
|
boolean |
isDataAvailable()
Not used, since the data is pushed to the DataReceiver.
|
boolean |
isHealthy()
This method is used to check if the transport if fully functional.
|
protected boolean |
isRunning()
Indicates whether this JDBCEITransport is running
|
void |
restoreState(StateBuffer buffer)
Restore the Object's state from the given buffer.
|
void |
run()
This is the transport's processing loop.
|
void |
saveState(StateBuffer buffer)
Save the Object's state to the given buffer.
|
protected void |
setRunning(boolean run)
Sets the boolean indicating whether the transport is running
|
void |
shutdown()
Shuts the transport down cleanly.
|
void |
unfreezeState()
Used by the StateManager thread to resume the processing
previously halted.
|
getCurrArchFile, getData, getDataReceiver, getDubCheckObj, getDupCheckFlag, getFileBulkData, getFileData, getFileDataReceiver, getFileList, getMovedFileStatus, getNode, getPollingInterval, getProcessedArchFile, handleRejectOfFile, incrementIn, incrementIn, isEndOfFile, isFileDataAvailable, isProcessing, isProcessingData, isStartOfFile, moveCurrentFileToBackUp, openInputFile, rejectFile, removeProcessedFile, setCountsSuspect, setDataReceiver, setFileDataReceiver, setFileToProcess, setMovedFileStatus, setNode, setPollingInterval, setProcessedArchFile, setProcessing, signalBatchCompletion, validOIMinorTypepublic JDBCEITransport(EINode node, JDBCEIRecordFactory rFactory, JDBCConnectionFactoryIfc cFactory, java.lang.String query, int fType, java.lang.String delete)
node - Reference to the node using this transportrFactory - Factory used to create the EI recordscFactory - Factory used to create the database connectionquery - The query statement to be used to select specific
rows from the databasefType - Indicates whether query is time-based or based upon
a unique identifier columndelete - The delete statement to be used to delete rows
from the database once they have been processedpublic JDBCEITransport(EINode node, JDBCEIRecordFactory rFactory, JDBCConnectionFactoryIfc cFactory, java.lang.String query, int fType, java.lang.String delete, DataReceiverIfc receiver)
node - Reference to the node using this transportrFactory - Factory used to create the EI recordscFactory - Factory used to create the database connectionquery - The query statement to be used to select specific
rows from the databasefType - Indicates whether query is time-based or based upon
a unique identifier columndelete - The delete statement to be used to delete rows
from the database once they have been processedrecevier - The transport's DataReceiverpublic void run()
run in interface java.lang.Runnablerun in class EITransportpublic void shutdown()
shutdown in interface DCTransportshutdown in class EITransportpublic boolean isHealthy()
isHealthy in interface DCTransportisHealthy in class EITransportpublic boolean isDataAvailable()
isDataAvailable in interface DataProviderIfcisDataAvailable in class EITransportpublic DCFieldContainer getData()
getData in interface DataProviderIfcgetData in class EITransportpublic DCFieldContainer[] getBulkData()
getBulkData in interface DataProviderIfcgetBulkData in class EITransportpublic void callback()
Callbackpublic void saveState(StateBuffer buffer) throws StateException
saveState in interface StateBufferSaveablebuffer - Buffer for writingStateExceptionpublic void restoreState(StateBuffer buffer) throws StateException
restoreState in interface StateBufferSaveablebuffer - Buffer for readingStateExceptionpublic void freezeState(Callback freezeCallback)
freezeState in interface StateFreezablefreezeCallback - Object to notify when the processing has
been frozen.public void unfreezeState()
unfreezeState in interface StateFreezableprotected void setRunning(boolean run)
protected boolean isRunning()
protected java.sql.Connection connect()
throws java.sql.SQLException
java.sql.SQLExceptionprotected void close(boolean commit)
commit - true, if any pending transactions should
be commited prior to closing the database connection.