org.apache.ignite.internal.processors.odbc.odbc

## Class OdbcConnectionContext

- java.lang.Object
- - org.apache.ignite.internal.processors.odbc.ClientListenerAbstractConnectionContext
  - - org.apache.ignite.internal.processors.odbc.odbc.OdbcConnectionContext

All Implemented Interfaces:
  ClientListenerConnectionContext

    public class OdbcConnectionContext
    extends ClientListenerAbstractConnectionContext

ODBC Connection Context.

### Field Summary

Fields
`static ClientListenerProtocolVersion` `VER_2_1_0` Version 2.1.0.
`static ClientListenerProtocolVersion` `VER_2_1_5` Version 2.1.5: added "lazy" flag.
`static ClientListenerProtocolVersion` `VER_2_3_0` Version 2.3.0: added "skipReducerOnUpdate" flag.
`static ClientListenerProtocolVersion` `VER_2_3_2` Version 2.3.2: added multiple statements support.
`static ClientListenerProtocolVersion` `VER_2_5_0` Version 2.5.0: added authentication.
`static ClientListenerProtocolVersion` `VER_2_7_0` Version 2.7.0: added precision and scale.

### Fields inherited from class org.apache.ignite.internal.processors.odbc.ClientListenerAbstractConnectionContext

`ctx`

### Constructor Summary

Constructors
Constructor and Description
`OdbcConnectionContext(GridKernalContext ctx, GridNioSession ses, GridSpinBusyLock busyLock, long connId, int maxCursors)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`ClientListenerProtocolVersion` `defaultVersion()`
`ClientListenerRequestHandler` `handler()` Handler getter.
`void` `initializeFromHandshake(ClientListenerProtocolVersion ver, BinaryReaderExImpl reader)` Initialize from handshake message.
`boolean` `isVersionSupported(ClientListenerProtocolVersion ver)`
`void` `onDisconnected()` Called whenever client is disconnected due to correct connection close or due to `IOException` during network operations.
`ClientListenerMessageParser` `parser()` Parser getter

### Methods inherited from class org.apache.ignite.internal.processors.odbc.ClientListenerAbstractConnectionContext

`authenticate, authorizationContext, connectionId, kernalContext, securityContext`

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

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

### Field Detail

#### VER_2_1_0

    public static final ClientListenerProtocolVersion VER_2_1_0

Version 2.1.0.

#### VER_2_1_5

    public static final ClientListenerProtocolVersion VER_2_1_5

Version 2.1.5: added "lazy" flag.

#### VER_2_3_0

    public static final ClientListenerProtocolVersion VER_2_3_0

Version 2.3.0: added "skipReducerOnUpdate" flag.

#### VER_2_3_2

    public static final ClientListenerProtocolVersion VER_2_3_2

Version 2.3.2: added multiple statements support.

#### VER_2_5_0

    public static final ClientListenerProtocolVersion VER_2_5_0

Version 2.5.0: added authentication.

#### VER_2_7_0

    public static final ClientListenerProtocolVersion VER_2_7_0

Version 2.7.0: added precision and scale.

### Constructor Detail

#### OdbcConnectionContext

    public OdbcConnectionContext(GridKernalContext ctx,
                                 GridNioSession ses,
                                 GridSpinBusyLock busyLock,
                                 long connId,
                                 int maxCursors)

Constructor.

Parameters:
  `ctx` - Kernal Context.
  `ses` - Session.
  `busyLock` - Shutdown busy lock.
  `connId` - Connection ID.
  `maxCursors` - Maximum allowed cursors.

### Method Detail

#### isVersionSupported

    public boolean isVersionSupported(ClientListenerProtocolVersion ver)

Parameters:
  `ver` - Version to check.
Returns:
  `true` if version is supported.

#### defaultVersion

    public ClientListenerProtocolVersion defaultVersion()

Returns:
  Current context version.

#### initializeFromHandshake

    public void initializeFromHandshake(ClientListenerProtocolVersion ver,
                                        BinaryReaderExImpl reader)
                                 throws IgniteCheckedException

Initialize from handshake message.

Parameters:
  `ver` - Protocol version.
  `reader` - Reader set to the configuration part of the handshake message.
Throws:
  `IgniteCheckedException` - On error.

#### handler

    public ClientListenerRequestHandler handler()

Handler getter.

Returns:
  Request handler for the connection.

#### parser

    public ClientListenerMessageParser parser()

Parser getter

Returns:
  Message parser for the connection.

#### onDisconnected

    public void onDisconnected()

Called whenever client is disconnected due to correct connection close or due to `IOException` during network operations.

Specified by:
  `onDisconnected` in interface `ClientListenerConnectionContext`
Overrides:
  `onDisconnected` in class `ClientListenerAbstractConnectionContext`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.8.1
Release Date | : May 21 2020