public abstract class Nio2Service extends AbstractInnerCloseable implements IoService, FactoryManagerHolder
AbstractCloseable.State| Modifier and Type | Field and Description |
|---|---|
static Map<String,AbstractMap.SimpleImmutableEntry<SocketOption<?>,Object>> |
CONFIGURABLE_OPTIONS |
protected AtomicBoolean |
disposing |
protected Map<Long,IoSession> |
sessions |
closeFuture, futureLock, statelogDEFAULT_REUSE_ADDRESSCLOSE_WAIT_TIMEOUT, DEFAULT_CLOSE_WAIT_TIMEOUT| Modifier | Constructor and Description |
|---|---|
protected |
Nio2Service(FactoryManager manager,
IoHandler handler,
AsynchronousChannelGroup group) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose() |
protected AsynchronousChannelGroup |
getChannelGroup() |
FactoryManager |
getFactoryManager() |
protected Closeable |
getInnerCloseable() |
IoHandler |
getIoHandler() |
IoServiceEventListener |
getIoServiceEventListener() |
Map<Long,IoSession> |
getManagedSessions() |
void |
sessionClosed(Nio2Session session) |
void |
setIoServiceEventListener(IoServiceEventListener listener) |
protected <T> boolean |
setOption(NetworkChannel socket,
String property,
SocketOption<T> option,
T defaultValue) |
protected <S extends NetworkChannel> |
setSocketOptions(S socket) |
protected void |
unmapSession(Long sessionId) |
doCloseGracefully, doCloseImmediatelyaddCloseFutureListener, builder, close, getFutureLock, isClosed, isClosing, preClose, removeCloseFutureListenergetSimplifiedLoggerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddCloseFutureListener, close, close, close, getMaxCloseWaitTime, isClosed, isClosing, isOpen, removeCloseFutureListenerpublic static final Map<String,AbstractMap.SimpleImmutableEntry<SocketOption<?>,Object>> CONFIGURABLE_OPTIONS
protected final AtomicBoolean disposing
protected Nio2Service(FactoryManager manager, IoHandler handler, AsynchronousChannelGroup group)
public IoServiceEventListener getIoServiceEventListener()
getIoServiceEventListener in interface IoServiceEventListenerManagerpublic void setIoServiceEventListener(IoServiceEventListener listener)
setIoServiceEventListener in interface IoServiceEventListenerManagerprotected AsynchronousChannelGroup getChannelGroup()
public FactoryManager getFactoryManager()
getFactoryManager in interface FactoryManagerHolderFactoryManagerpublic IoHandler getIoHandler()
public void dispose()
protected Closeable getInnerCloseable()
getInnerCloseable in class AbstractInnerCloseablepublic Map<Long,IoSession> getManagedSessions()
getManagedSessions in interface IoServicepublic void sessionClosed(Nio2Session session)
protected void unmapSession(Long sessionId)
protected <S extends NetworkChannel> S setSocketOptions(S socket) throws IOException
IOExceptionprotected <T> boolean setOption(NetworkChannel socket, String property, SocketOption<T> option, T defaultValue) throws IOException
IOExceptionCopyright © 2008–2020 The Apache Software Foundation. All rights reserved.