Package org.apache.sshd.common.io.nio2
Class Nio2Connector
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Channel
,Closeable
,IoConnector
,IoService
,IoServiceEventListenerManager
TODO Add javadoc
- Author:
- Apache MINA SSHD Project
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
AbstractCloseable.State
-
Field Summary
Fields inherited from class org.apache.sshd.common.io.nio2.Nio2Service
CONFIGURABLE_OPTIONS, disposing, propertyResolver, sessions
Fields inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
closeFuture, futureLock, state
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
Fields inherited from interface org.apache.sshd.common.io.IoService
DEFAULT_REUSE_ADDRESS
-
Constructor Summary
ConstructorDescriptionNio2Connector
(Nio2ServiceFactory nio2ServiceFactory, PropertyResolver propertyResolver, IoHandler handler, AsynchronousChannelGroup group, ExecutorService resumeTasks) -
Method Summary
Modifier and TypeMethodDescriptionconnect
(SocketAddress address, AttributeRepository context, SocketAddress localAddress) protected Nio2CompletionHandler<Void,
Object> createConnectionCompletionHandler
(IoConnectFuture future, AsynchronousSocketChannel socket, AttributeRepository context, PropertyResolver propertyResolver, IoHandler handler) protected Nio2Session
createSession
(PropertyResolver propertyResolver, IoHandler handler, AsynchronousSocketChannel socket) protected AsynchronousSocketChannel
openAsynchronousSocketChannel
(SocketAddress address, AsynchronousChannelGroup group) Methods inherited from class org.apache.sshd.common.io.nio2.Nio2Service
dispose, getChannelGroup, getExecutorService, getInnerCloseable, getIoHandler, getIoServiceEventListener, getManagedSessions, sessionClosed, setIoServiceEventListener, setOption, setSocketOptions, unmapSession
Methods inherited from class org.apache.sshd.common.util.closeable.AbstractInnerCloseable
doCloseGracefully, doCloseImmediately
Methods inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
addCloseFutureListener, builder, close, getFutureLock, isClosed, isClosing, preClose, removeCloseFutureListener
Methods 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, warn
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.sshd.common.Closeable
addCloseFutureListener, close, close, isClosed, isClosing, isOpen, removeCloseFutureListener
Methods inherited from interface org.apache.sshd.common.io.IoService
getManagedSessions
Methods inherited from interface org.apache.sshd.common.io.IoServiceEventListenerManager
getIoServiceEventListener, setIoServiceEventListener
-
Constructor Details
-
Nio2Connector
public Nio2Connector(Nio2ServiceFactory nio2ServiceFactory, PropertyResolver propertyResolver, IoHandler handler, AsynchronousChannelGroup group, ExecutorService resumeTasks)
-
-
Method Details
-
connect
public IoConnectFuture connect(SocketAddress address, AttributeRepository context, SocketAddress localAddress) - Specified by:
connect
in interfaceIoConnector
-
openAsynchronousSocketChannel
protected AsynchronousSocketChannel openAsynchronousSocketChannel(SocketAddress address, AsynchronousChannelGroup group) throws IOException - Throws:
IOException
-
createConnectionCompletionHandler
protected Nio2CompletionHandler<Void,Object> createConnectionCompletionHandler(IoConnectFuture future, AsynchronousSocketChannel socket, AttributeRepository context, PropertyResolver propertyResolver, IoHandler handler) -
createSession
protected Nio2Session createSession(PropertyResolver propertyResolver, IoHandler handler, AsynchronousSocketChannel socket) throws Throwable - Throws:
Throwable
-