public interface GridNioServerListener<T> extends EventListener
GridNioServer that will be notified on client events.| Modifier and Type | Method and Description |
|---|---|
void |
onConnected(GridNioSession ses)
This method is called whenever a new client is connected and session is created.
|
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. |
void |
onFailure(FailureType failureType,
Throwable failure)
Called when critical failure occurs in server implementation.
|
void |
onMessage(GridNioSession ses,
T msg)
This method is called whenever a
GridNioParser returns non-null value. |
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.
|
void onConnected(GridNioSession ses)
ses - Newly created session for remote client.void onDisconnected(GridNioSession ses, @Nullable @Nullable Exception e)
IOException during network operations.ses - Closed session.e - Exception occurred, if any.void onMessageSent(GridNioSession ses, T msg)
ses - Session.msg - Message.void onMessage(GridNioSession ses, T msg)
GridNioParser returns non-null value.ses - Session on which message was received.msg - Parsed message.void onSessionWriteTimeout(GridNioSession ses)
ses - Session that has timed out writes.void onSessionIdleTimeout(GridNioSession ses)
ses - Session that is idle.void onFailure(FailureType failureType, Throwable failure)
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.8.0 Release Date : February 27 2020