org.apache.ignite.internal.processors.odbc

## Class OdbcNioListener

- java.lang.Object
- - org.apache.ignite.internal.util.nio.GridNioServerListenerAdapter<byte[]>
  - - org.apache.ignite.internal.processors.odbc.OdbcNioListener

All Implemented Interfaces:
  GridNioServerListener<byte[]>

    public class OdbcNioListener
    extends GridNioServerListenerAdapter<byte[]>

ODBC message listener.

### Constructor Summary

Constructors
Constructor and Description
`OdbcNioListener(GridKernalContext ctx, GridSpinBusyLock busyLock, int maxCursors)` Constructor.

### Method Summary

Methods
`void` `onConnected(GridNioSession ses)` This method is called whenever a new client is connected and session is created.
`void` `onDisconnected(GridNioSession ses, Exception e)` This method is called whenever client is disconnected due to correct connection close or due to `IOException` during network operations.
`void` `onMessage(GridNioSession ses, byte[] msg)` This method is called whenever a `GridNioParser` returns non-null value.

### Methods inherited from class org.apache.ignite.internal.util.nio.GridNioServerListenerAdapter

`onSessionIdleTimeout, onSessionWriteTimeout`

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

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

### Constructor Detail

#### OdbcNioListener

    public OdbcNioListener(GridKernalContext ctx,
                   GridSpinBusyLock busyLock,
                   int maxCursors)

Constructor.

Parameters:
  `ctx` - Context.
  `busyLock` - Shutdown busy lock.
  `maxCursors` - Maximum allowed cursors.

### Method Detail

#### onConnected

    public void onConnected(GridNioSession ses)

This method is called whenever a new client is connected and session is created.

Parameters:
  `ses` - Newly created session for remote client.

#### onDisconnected

    public void onDisconnected(GridNioSession ses,
                      @Nullable
                      Exception e)

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

Parameters:
  `ses` - Closed session.
  `e` - Exception occurred, if any.

#### onMessage

    public void onMessage(GridNioSession ses,
                 byte[] msg)

This method is called whenever a `GridNioParser` returns non-null value.

Parameters:
  `ses` - Session on which message was received.
  `msg` - Parsed message.

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.0.0
Release Date | : April 30 2017