public abstract class Nio2Service extends CloseableUtils.AbstractInnerCloseable implements IoService
CloseableUtils.AbstractCloseable.State
Modifier and Type | Field and Description |
---|---|
protected AtomicBoolean |
disposing |
protected AsynchronousChannelGroup |
group |
protected IoHandler |
handler |
protected org.slf4j.Logger |
logger |
protected FactoryManager |
manager |
protected Map<Long,IoSession> |
sessions |
closeFuture, lock, log, state
Modifier | Constructor and Description |
---|---|
protected |
Nio2Service(FactoryManager manager,
IoHandler handler,
AsynchronousChannelGroup group) |
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
protected Closeable |
getInnerCloseable() |
Map<Long,IoSession> |
getManagedSessions()
Returns the map of all sessions which are currently managed by this
service.
|
void |
sessionClosed(Nio2Session session) |
protected <T> void |
setOption(NetworkChannel socket,
String property,
SocketOption<T> option,
T defaultValue) |
doCloseGracefully, doCloseImmediately
builder, close, isClosed, isClosing, preClose
protected final org.slf4j.Logger logger
protected final FactoryManager manager
protected final IoHandler handler
protected final AtomicBoolean disposing
protected final AsynchronousChannelGroup group
protected Nio2Service(FactoryManager manager, IoHandler handler, AsynchronousChannelGroup group)
protected Closeable getInnerCloseable()
getInnerCloseable
in class CloseableUtils.AbstractInnerCloseable
public Map<Long,IoSession> getManagedSessions()
IoService
ID
of the
session.getManagedSessions
in interface IoService
public void sessionClosed(Nio2Session session)
protected <T> void setOption(NetworkChannel socket, String property, SocketOption<T> option, T defaultValue) throws IOException
IOException
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.