org.apache.ignite.internal.util.nio

## Class GridNioServerListenerAdapter<T>

- java.lang.Object
- - org.apache.ignite.internal.util.nio.GridNioServerListenerAdapter<T>

All Implemented Interfaces:
  GridNioServerListener<T>

Direct Known Subclasses:
  ClientListenerNioListener, GridRedisNioListener, GridTcpMemcachedNioListener, GridTcpRestNioListener

    public abstract class GridNioServerListenerAdapter<T>
    extends Object
    implements GridNioServerListener<T>

Server listener adapter providing empty methods implementation for rarely used methods.

### Constructor Summary

Constructors
Constructor and Description
`GridNioServerListenerAdapter()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `onFailure(FailureType failureType, Throwable failure)` Called when critical failure occurs in server implementation.
`void` `onMessageSent(GridNioSession ses, T msg)` Handle message sent.
`void` `onSessionIdleTimeout(GridNioSession ses)` Called when session did not receive any activity within timeout interval.
`void` `onSessionWriteTimeout(GridNioSession ses)` Called when session has non-empty write queue and server did not send any data within timeout interval.

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

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

### Methods inherited from interface org.apache.ignite.internal.util.nio.GridNioServerListener

`onConnected, onDisconnected, onMessage`

### Constructor Detail

#### GridNioServerListenerAdapter

    public GridNioServerListenerAdapter()

### Method Detail

#### onSessionWriteTimeout

    public void onSessionWriteTimeout(GridNioSession ses)

Called when session has non-empty write queue and server did not send any data within timeout interval.

Specified by:
  `onSessionWriteTimeout` in interface `GridNioServerListener<T>`
Parameters:
  `ses` - Session that has timed out writes.

#### onSessionIdleTimeout

    public void onSessionIdleTimeout(GridNioSession ses)

Called when session did not receive any activity within timeout interval.

Specified by:
  `onSessionIdleTimeout` in interface `GridNioServerListener<T>`
Parameters:
  `ses` - Session that is idle.

#### onMessageSent

    public void onMessageSent(GridNioSession ses,
                              T msg)

Handle message sent.

Specified by:
  `onMessageSent` in interface `GridNioServerListener<T>`
Parameters:
  `ses` - Session.
  `msg` - Message.

#### onFailure

    public void onFailure(FailureType failureType,
                          Throwable failure)

Description copied from interface: `GridNioServerListener`
Called when critical failure occurs in server implementation.

Specified by:
  `onFailure` in interface `GridNioServerListener<T>`

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.5.0
Release Date | : May 23 2018