Class GridTcpMemcachedNioListener
- java.lang.Object
-
- org.apache.ignite.internal.util.nio.GridNioServerListenerAdapter<GridMemcachedMessage>
-
- org.apache.ignite.internal.processors.rest.protocols.tcp.GridTcpMemcachedNioListener
-
- All Implemented Interfaces:
EventListener,GridNioServerListener<GridMemcachedMessage>
public class GridTcpMemcachedNioListener extends GridNioServerListenerAdapter<GridMemcachedMessage>
Handles memcache requests.
-
-
Constructor Summary
Constructors Constructor Description GridTcpMemcachedNioListener(IgniteLogger log, GridRestProtocolHandler hnd)Creates listener which will convert incoming tcp packets to rest requests and forward them to a given rest handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonConnected(GridNioSession ses)This method is called whenever a new client is connected and session is created.voidonDisconnected(GridNioSession ses, @Nullable Exception e)This method is called whenever client is disconnected due to correct connection close or due toIOExceptionduring network operations.voidonMessage(GridNioSession ses, GridMemcachedMessage req)This method is called whenever aGridNioParserreturns non-null value.-
Methods inherited from class org.apache.ignite.internal.util.nio.GridNioServerListenerAdapter
onFailure, onMessageSent, onSessionIdleTimeout, onSessionWriteTimeout
-
-
-
-
Constructor Detail
-
GridTcpMemcachedNioListener
public GridTcpMemcachedNioListener(IgniteLogger log, GridRestProtocolHandler hnd)
Creates listener which will convert incoming tcp packets to rest requests and forward them to a given rest handler.- Parameters:
log- Logger to use.hnd- Rest handler.
-
-
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 @Nullable Exception e)
This method is called whenever client is disconnected due to correct connection close or due toIOExceptionduring network operations.- Parameters:
ses- Closed session.e- Exception occurred, if any.
-
onMessage
public void onMessage(GridNioSession ses, GridMemcachedMessage req)
This method is called whenever aGridNioParserreturns non-null value.- Parameters:
ses- Session on which message was received.req- Parsed message.
-
-