public abstract class Nio2Service extends AbstractInnerCloseable implements IoService
AbstractCloseable.State| Modifier and Type | Field and Description |
|---|---|
static Map<Property<?>,AbstractMap.SimpleImmutableEntry<SocketOption<?>,Object>> |
CONFIGURABLE_OPTIONS |
protected AtomicBoolean |
disposing |
protected PropertyResolver |
propertyResolver |
protected Map<Long,IoSession> |
sessions |
closeFuture, futureLock, statelogDEFAULT_REUSE_ADDRESS| Modifier | Constructor and Description |
|---|---|
protected |
Nio2Service(PropertyResolver propertyResolver,
IoHandler handler,
AsynchronousChannelGroup group) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose() |
protected AsynchronousChannelGroup |
getChannelGroup() |
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,
Property<?> 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, removeCloseFutureListenerdebug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warnclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddCloseFutureListener, close, close, close, getMaxCloseWaitTime, isClosed, isClosing, isOpen, removeCloseFutureListenerpublic static final Map<Property<?>,AbstractMap.SimpleImmutableEntry<SocketOption<?>,Object>> CONFIGURABLE_OPTIONS
protected final AtomicBoolean disposing
protected final PropertyResolver propertyResolver
protected Nio2Service(PropertyResolver propertyResolver, IoHandler handler, AsynchronousChannelGroup group)
public IoServiceEventListener getIoServiceEventListener()
getIoServiceEventListener in interface IoServiceEventListenerManagerpublic void setIoServiceEventListener(IoServiceEventListener listener)
setIoServiceEventListener in interface IoServiceEventListenerManagerprotected AsynchronousChannelGroup getChannelGroup()
public 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, Property<?> property, SocketOption<T> option, T defaultValue) throws IOException
IOExceptionCopyright © 2008–2021 The Apache Software Foundation. All rights reserved.