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 FactoryManager |
manager |
protected Map<Long,IoSession> |
sessions |
closeFuture, lock, statelog| 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, doCloseImmediatelybuilder, close, isClosed, isClosing, preCloseclose, isOpenprotected final FactoryManager manager
protected final IoHandler handler
protected final AtomicBoolean disposing
protected final AsynchronousChannelGroup group
protected Nio2Service(FactoryManager manager, IoHandler handler, AsynchronousChannelGroup group)
public void dispose()
protected Closeable getInnerCloseable()
getInnerCloseable in class CloseableUtils.AbstractInnerCloseablepublic Map<Long,IoSession> getManagedSessions()
IoServiceID of the
session.getManagedSessions in interface IoServicepublic void sessionClosed(Nio2Session session)
protected <T> void setOption(NetworkChannel socket, String property, SocketOption<T> option, T defaultValue) throws IOException
IOExceptionCopyright © 2008–2015 The Apache Software Foundation. All rights reserved.