Package org.teiid.jdbc
Interface StatementCallback
-
- All Known Subinterfaces:
ContinuousStatementCallback
public interface StatementCallback
A callback for non-blocking statement result processing.Statement.close()
must still be called to release statement resources. Statement methods, such as cancel, are perfectly valid even when using a callback.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onComplete(Statement s)
Called when processing has completed normally.void
onException(Statement s, Exception e)
Called when an exception occurs.void
onRow(Statement s, ResultSet rs)
Process the current row of theResultSet
.
-
-
-
Method Detail
-
onRow
void onRow(Statement s, ResultSet rs) throws Exception
Process the current row of theResultSet
. Any call that retrieves non-lob values from the current row will be performed without blocking on more data from sources. Calls outside of the current row, such as next(), may block.- Parameters:
rs
-- Throws:
Exception
-
onException
void onException(Statement s, Exception e) throws Exception
Called when an exception occurs. No further rows will be processed by this callback.- Parameters:
e
-- Throws:
Exception
-
-