Package org.firebirdsql.gds.ng.listeners
Class StatementListenerDispatcher
java.lang.Object
org.firebirdsql.gds.ng.listeners.AbstractListenerDispatcher<StatementListener>
org.firebirdsql.gds.ng.listeners.StatementListenerDispatcher
- All Implemented Interfaces:
Iterable<StatementListener>,StatementListener
public final class StatementListenerDispatcher
extends AbstractListenerDispatcher<StatementListener>
implements StatementListener
Dispatcher to maintain and notify other
StatementListener.- Since:
- 3.0
- Author:
- Mark Rotteveel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidallRowsFetched(FbStatement sender) Method to be notified when all rows have been fetched.voidreceivedRow(FbStatement sender, RowValue rowValue) Method to be notified of a new row of data.voidsqlCounts(FbStatement sender, SqlCountHolder sqlCounts) Called when the SQL counts of a statement have been retrieved.voidstatementExecuted(FbStatement sender, boolean hasResultSet, boolean hasSingletonResult) Method to be notified when a statement has been executed.voidstatementStateChanged(FbStatement sender, StatementState newState, StatementState previousState) Method to be notified when the state of a statement has changed.voidwarningReceived(FbStatement sender, SQLWarning warning) Called when a warning was received for thesenderstatement.Methods inherited from class org.firebirdsql.gds.ng.listeners.AbstractListenerDispatcher
addListener, addWeakListener, isShutdown, iterator, removeAllListeners, removeListener, shutdownMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
StatementListenerDispatcher
public StatementListenerDispatcher()
-
-
Method Details
-
receivedRow
Description copied from interface:StatementListenerMethod to be notified of a new row of data.- Specified by:
receivedRowin interfaceStatementListener- Parameters:
sender- TheFbStatementthat called this method.rowValue- The row values.
-
allRowsFetched
Description copied from interface:StatementListenerMethod to be notified when all rows have been fetched.This method may also be called when the statement did not produce any rows (or did not open a result set).
- Specified by:
allRowsFetchedin interfaceStatementListener- Parameters:
sender- TheFbStatementthat called this method.- See Also:
-
statementExecuted
Description copied from interface:StatementListenerMethod to be notified when a statement has been executed.This event with
hasResultSet=truecan be seen as the counter part ofStatementListener.allRowsFetched(FbStatement).- Specified by:
statementExecutedin interfaceStatementListener- Parameters:
sender- TheFbStatementthat called this method.hasResultSet-truethere is a result set,falsethere is no result sethasSingletonResult-truesingleton result,falsestatement will produce indeterminate number of rows; can be ignored whenhasResultSetis false.
-
statementStateChanged
public void statementStateChanged(FbStatement sender, StatementState newState, StatementState previousState) Description copied from interface:StatementListenerMethod to be notified when the state of a statement has changed.- Specified by:
statementStateChangedin interfaceStatementListener- Parameters:
sender- TheFbStatementthat called this method.newState- The new state of the statementpreviousState- The old state of the statement
-
warningReceived
Description copied from interface:StatementListenerCalled when a warning was received for thesenderstatement.- Specified by:
warningReceivedin interfaceStatementListener- Parameters:
sender- Statement receiving the warningwarning- Warning
-
sqlCounts
Description copied from interface:StatementListenerCalled when the SQL counts of a statement have been retrieved.- Specified by:
sqlCountsin interfaceStatementListener- Parameters:
sender- Statement that called this methodsqlCounts- SQL counts
-