Package com.google.code.yanf4j.nio.impl
Class SocketChannelController
java.lang.Object
com.google.code.yanf4j.core.impl.AbstractController
com.google.code.yanf4j.nio.impl.NioController
com.google.code.yanf4j.nio.impl.SocketChannelController
- All Implemented Interfaces:
Controller,ControllerLifeCycle,SelectionKeyHandler
- Direct Known Subclasses:
MemcachedConnector,TCPController
Nio tcp socket controller
-
Field Summary
FieldsFields inherited from class com.google.code.yanf4j.nio.impl.NioController
selectorManager, selectorPoolSizeFields inherited from class com.google.code.yanf4j.core.impl.AbstractController
codecFactory, configuration, dispatchMessageDispatcher, dispatchMessageThreadCount, handler, handleReadWriteConcurrently, localSocketAddress, log, readEventDispatcher, readThreadCount, sessionSet, sessionTimeout, socketOptions, soTimeout, started, stateListeners, statistics, statisticsInterval, writeEventDispatcher, writeThreadCount -
Constructor Summary
ConstructorsConstructorDescriptionSocketChannelController(Configuration configuration) SocketChannelController(Configuration configuration, CodecFactory codecFactory) SocketChannelController(Configuration configuration, Handler handler, CodecFactory codecFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected NioSessionprotected final voidConfiure socket channelprotected final voidDispatch read eventprotected final voidDispatch write eventvoidsetSoLinger(boolean on, int value) Methods inherited from class com.google.code.yanf4j.nio.impl.NioController
bind, buildSessionConfig, closeSelectionKey, doStart, getSelectorManager, getSelectorPoolSize, initialSelectorManager, onRead, onWrite, setSelectorPoolSize, start0, stop0Methods inherited from class com.google.code.yanf4j.core.impl.AbstractController
addStateListener, bind, buildQueue, checkStatisticsForRestart, getCodecFactory, getConfiguration, getDispatchMessageThreadCount, getHandler, getLocalSocketAddress, getPort, getReadThreadCount, getReceiveThroughputLimit, getSendThroughputLimit, getSessionIdleTimeout, getSessionSet, getSessionTimeout, getSocketOption, getSoTimeout, getStatistics, getWriteThreadCount, isHandleReadWriteConcurrently, isStarted, notifyAllSessionClosed, notifyException, notifyReady, notifyStarted, notifyStopped, onAccept, onConnect, registerSession, removeStateListener, setCodecFactory, setConfiguration, setDispatchMessageThreadCount, setHandler, setHandleReadWriteConcurrently, setLocalSocketAddress, setReadThreadCount, setReceiveThroughputLimit, setSendThroughputLimit, setSessionIdleTimeout, setSessionTimeout, setSocketOption, setSocketOptions, setSoTimeout, setWriteThreadCount, start, stop, unregisterSessionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.code.yanf4j.nio.SelectionKeyHandler
closeChannel, onAccept, onConnect
-
Field Details
-
soLingerOn
protected boolean soLingerOn
-
-
Constructor Details
-
SocketChannelController
public SocketChannelController() -
SocketChannelController
-
SocketChannelController
-
SocketChannelController
public SocketChannelController(Configuration configuration, Handler handler, CodecFactory codecFactory)
-
-
Method Details
-
setSoLinger
public void setSoLinger(boolean on, int value) -
dispatchReadEvent
Description copied from class:NioControllerDispatch read event- Specified by:
dispatchReadEventin classNioController- Parameters:
key-
-
dispatchWriteEvent
Description copied from class:NioControllerDispatch write event- Specified by:
dispatchWriteEventin classNioController- Parameters:
key-
-
buildSession
-
configureSocketChannel
Confiure socket channel- Parameters:
sc-- Throws:
IOException
-