public class GridTcpRestNioListener extends GridNioServerListenerAdapter<GridClientMessage>
| Constructor and Description |
|---|
GridTcpRestNioListener(IgniteLogger log,
GridTcpRestProtocol proto,
GridRestProtocolHandler hnd,
GridKernalContext ctx)
Creates listener which will convert incoming tcp packets to rest requests and forward them to
a given rest handler.
|
| 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,
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,
GridClientMessage msg)
This method is called whenever a
GridNioParser returns non-null value. |
void |
onSessionIdleTimeout(GridNioSession ses)
Closes the session by timeout (i.e. inactivity within the configured period of time).
|
onSessionWriteTimeoutpublic GridTcpRestNioListener(IgniteLogger log, GridTcpRestProtocol proto, GridRestProtocolHandler hnd, GridKernalContext ctx)
log - Logger to use.proto - Protocol.hnd - Rest handler.ctx - Context.public void onConnected(GridNioSession ses)
ses - Newly created session for remote client.public void onDisconnected(GridNioSession ses, @Nullable Exception e)
IOException during network operations.ses - Closed session.e - Exception occurred, if any.public void onMessage(GridNioSession ses, GridClientMessage msg)
GridNioParser returns non-null value.ses - Session on which message was received.msg - Parsed message.public void onSessionIdleTimeout(GridNioSession ses)
onSessionIdleTimeout in interface GridNioServerListener<GridClientMessage>onSessionIdleTimeout in class GridNioServerListenerAdapter<GridClientMessage>ses - Session, that was inactive.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.1.0-incubating Release Date : May 20 2015