Package org.apache.calcite.avatica

# Class HandlerImpl

java.lang.Object
org.apache.calcite.avatica.HandlerImpl

All Implemented Interfaces:
  `Handler`

public class HandlerImpl extends Object implements Handler
Implementation of `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
Constructor
Description
`HandlerImpl()`

## Method Summary

Modifier and Type
Method
Description
`void`
`onConnectionClose(AvaticaConnection connection)`
Called by container when a connection is being closed.
`void`
`onConnectionInit(AvaticaConnection connection)`
Called by container when a connection is being created.
`void`
`onStatementClose(AvaticaStatement statement)`
Called by container when a statement is being closed.
`void`
`onStatementExecute(AvaticaStatement statement, Handler.ResultSink resultSink)`
Called by container when a statement is being executed.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### HandlerImpl

public HandlerImpl()

## Method Details

### onConnectionInit

public void onConnectionInit(AvaticaConnection connection) throws SQLException
Description copied from interface: `Handler`
Called by container when a connection is being created.

If the implementation of this method throws, the connection will not be created.

Specified by:
  `onConnectionInit` in interface `Handler`
Parameters:
  `connection` - Connection
Throws:
  `SQLException` - on error

### onConnectionClose

public void onConnectionClose(AvaticaConnection connection)
Description copied from interface: `Handler`
Called 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:
  `onConnectionClose` in interface `Handler`
Parameters:
  `connection` - Connection

### onStatementExecute

public void onStatementExecute(AvaticaStatement statement, Handler.ResultSink resultSink)
Description copied from interface: `Handler`
Called by container when a statement is being executed.

If the session would like the statement results stored in a temporary table, `resultSink` is not null. The provider must call its `Handler.ResultSink.toBeCompleted()` method at some point during execution (not necessarily before the call to this method returns).

Specified by:
  `onStatementExecute` in interface `Handler`
Parameters:
  `statement` - Statement
  `resultSink` - Place to put result of query. Null if container does not want results stored to a temporary table

### onStatementClose

public void onStatementClose(AvaticaStatement statement)
Description copied from interface: `Handler`
Called by container when a statement is being closed.

This method is called after marking the statement closed, and after closing any open `ResultSet` objects.

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:
  `onStatementClose` in interface `Handler`
Parameters:
  `statement` - Statement