Package com.google.code.yanf4j.nio
Interface NioSession
-
- All Superinterfaces:
Session
- All Known Implementing Classes:
AbstractNioSession
,MemcachedTCPSession
,NioTCPSession
public interface NioSession extends Session
Nio connection
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.google.code.yanf4j.core.Session
Session.SessionStatus
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.nio.channels.SelectableChannel
channel()
return the channel for this connectionvoid
enableRead(java.nio.channels.Selector selector)
Enable read eventvoid
enableWrite(java.nio.channels.Selector selector)
Enable write eventvoid
onEvent(EventType event, java.nio.channels.Selector selector)
When io event occured-
Methods inherited from interface com.google.code.yanf4j.core.Session
clearAttributes, close, flush, getAttribute, getDecoder, getEncoder, getHandler, getLastOperationTimeStamp, getLocalAddress, getReadBufferByteOrder, getRemoteSocketAddress, getScheduleWritenBytes, getSessionIdleTimeout, getSessionTimeout, isClosed, isExpired, isHandleReadWriteConcurrently, isIdle, isLoopbackConnection, isUseBlockingRead, isUseBlockingWrite, removeAttribute, setAttribute, setAttributeIfAbsent, setDecoder, setEncoder, setHandleReadWriteConcurrently, setReadBufferByteOrder, setSessionIdleTimeout, setSessionTimeout, setUseBlockingRead, setUseBlockingWrite, start, write
-
-
-
-
Method Detail
-
onEvent
void onEvent(EventType event, java.nio.channels.Selector selector)
When io event occured- Parameters:
event
-selector
-
-
enableRead
void enableRead(java.nio.channels.Selector selector)
Enable read event- Parameters:
selector
-
-
enableWrite
void enableWrite(java.nio.channels.Selector selector)
Enable write event- Parameters:
selector
-
-
channel
java.nio.channels.SelectableChannel channel()
return the channel for this connection- Returns:
-
-