Class Nio2Service
java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.common.util.closeable.IoBaseCloseable
org.apache.sshd.common.util.closeable.AbstractCloseable
org.apache.sshd.common.util.closeable.AbstractInnerCloseable
org.apache.sshd.common.io.nio2.Nio2Service
- All Implemented Interfaces:
Closeable, AutoCloseable, Channel, org.apache.sshd.common.Closeable, org.apache.sshd.common.io.IoService, org.apache.sshd.common.io.IoServiceEventListenerManager
- Direct Known Subclasses:
Nio2Acceptor, Nio2Connector
public abstract class Nio2Service
extends org.apache.sshd.common.util.closeable.AbstractInnerCloseable
implements org.apache.sshd.common.io.IoService
- Author:
- Apache MINA SSHD Project
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
org.apache.sshd.common.util.closeable.AbstractCloseable.State -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Map<org.apache.sshd.common.Property<?>, AbstractMap.SimpleImmutableEntry<SocketOption<?>, Object>> protected final AtomicBooleanprotected final org.apache.sshd.common.PropertyResolverFields inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
closeFuture, futureLock, stateFields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
logFields inherited from interface org.apache.sshd.common.io.IoService
DEFAULT_REUSE_ADDRESS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedNio2Service(org.apache.sshd.common.PropertyResolver propertyResolver, org.apache.sshd.common.io.IoHandler handler, AsynchronousChannelGroup group, ExecutorService resumeTasks) -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()protected AsynchronousChannelGroupprotected ExecutorServiceprotected org.apache.sshd.common.Closeableorg.apache.sshd.common.io.IoHandlerorg.apache.sshd.common.io.IoServiceEventListenerprotected org.apache.sshd.common.io.IoSessionmapSession(org.apache.sshd.common.io.IoSession session) voidsessionClosed(Nio2Session session) voidsetIoServiceEventListener(org.apache.sshd.common.io.IoServiceEventListener listener) protected <T> booleansetOption(NetworkChannel socket, org.apache.sshd.common.Property<?> property, SocketOption<T> option, T defaultValue) protected <S extends NetworkChannel>
SsetSocketOptions(S socket) protected voidunmapSession(Long sessionId) Methods inherited from class org.apache.sshd.common.util.closeable.AbstractInnerCloseable
doCloseGracefully, doCloseImmediatelyMethods inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
addCloseFutureListener, builder, close, getFutureLock, isClosed, isClosing, preClose, removeCloseFutureListenerMethods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warnMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.sshd.common.Closeable
addCloseFutureListener, close, close, isClosed, isClosing, isOpen, removeCloseFutureListener
-
Field Details
-
CONFIGURABLE_OPTIONS
public static final Map<org.apache.sshd.common.Property<?>, AbstractMap.SimpleImmutableEntry<SocketOption<?>, Object>> CONFIGURABLE_OPTIONS -
sessions
-
disposing
-
propertyResolver
protected final org.apache.sshd.common.PropertyResolver propertyResolver
-
-
Constructor Details
-
Nio2Service
protected Nio2Service(org.apache.sshd.common.PropertyResolver propertyResolver, org.apache.sshd.common.io.IoHandler handler, AsynchronousChannelGroup group, ExecutorService resumeTasks)
-
-
Method Details
-
getIoServiceEventListener
public org.apache.sshd.common.io.IoServiceEventListener getIoServiceEventListener()- Specified by:
getIoServiceEventListenerin interfaceorg.apache.sshd.common.io.IoServiceEventListenerManager
-
setIoServiceEventListener
public void setIoServiceEventListener(org.apache.sshd.common.io.IoServiceEventListener listener) - Specified by:
setIoServiceEventListenerin interfaceorg.apache.sshd.common.io.IoServiceEventListenerManager
-
getChannelGroup
-
getExecutorService
-
getIoHandler
public org.apache.sshd.common.io.IoHandler getIoHandler() -
dispose
public void dispose() -
getInnerCloseable
protected org.apache.sshd.common.Closeable getInnerCloseable()- Specified by:
getInnerCloseablein classorg.apache.sshd.common.util.closeable.AbstractInnerCloseable
-
getManagedSessions
-
sessionClosed
-
mapSession
protected org.apache.sshd.common.io.IoSession mapSession(org.apache.sshd.common.io.IoSession session) -
unmapSession
-
setSocketOptions
- Throws:
IOException
-
setOption
protected <T> boolean setOption(NetworkChannel socket, org.apache.sshd.common.Property<?> property, SocketOption<T> option, T defaultValue) throws IOException - Throws:
IOException
-