Class HandlerImpl
- All Implemented Interfaces:
Handler
Handler that does nothing for each callback.
It is recommended implementations of Handler use this as a base
class, to ensure forward compatibility.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.calcite.avatica.Handler
Handler.ResultSink -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonConnectionClose(AvaticaConnection connection) Called by container when a connection is being closed.voidonConnectionInit(AvaticaConnection connection) Called by container when a connection is being created.voidonStatementClose(AvaticaStatement statement) Called by container when a statement is being closed.voidonStatementExecute(AvaticaStatement statement, Handler.ResultSink resultSink) Called by container when a statement is being executed.
-
Constructor Details
-
HandlerImpl
public HandlerImpl()
-
-
Method Details
-
onConnectionInit
Description copied from interface:HandlerCalled by container when a connection is being created.If the implementation of this method throws, the connection will not be created.
- Specified by:
onConnectionInitin interfaceHandler- Parameters:
connection- Connection- Throws:
SQLException- on error
-
onConnectionClose
Description copied from interface:HandlerCalled by container when a connection is being closed.If the implementation of this method throws, the call to
Connection.close()that triggered this method will throw an exception, but the connection will still be marked closed.- Specified by:
onConnectionClosein interfaceHandler- Parameters:
connection- Connection
-
onStatementExecute
Description copied from interface:HandlerCalled by container when a statement is being executed.If the session would like the statement results stored in a temporary table,
resultSinkis not null. The provider must call itsHandler.ResultSink.toBeCompleted()method at some point during execution (not necessarily before the call to this method returns).- Specified by:
onStatementExecutein interfaceHandler- Parameters:
statement- StatementresultSink- Place to put result of query. Null if container does not want results stored to a temporary table
-
onStatementClose
Description copied from interface:HandlerCalled by container when a statement is being closed.This method is called after marking the statement closed, and after closing any open
ResultSetobjects.If the implementation of this method throws, the call to
Statement.close()that triggered this method will throw an exception, but the statement will still be marked closed.- Specified by:
onStatementClosein interfaceHandler- Parameters:
statement- Statement
-