Top Description Inners Fields Constructors Methods
org.apache.sshd.common.io.nio2

public Class Nio2Connector

extends Nio2Service
implements IoConnector
Class Inheritance
All Implemented Interfaces
org.apache.sshd.common.io.IoConnector, org.apache.sshd.common.io.IoService, org.apache.sshd.common.io.IoServiceEventListenerManager, org.apache.sshd.common.Closeable, java.nio.channels.Channel, java.io.Closeable, java.lang.AutoCloseable
Imports
java.io.IOException, java.net.ConnectException, .SocketAddress, java.nio.channels.AsynchronousChannelGroup, .AsynchronousSocketChannel, java.util.concurrent.CancellationException, .ExecutionException, .ExecutorService, .Future, .TimeUnit, .TimeoutException, org.apache.sshd.common.AttributeRepository, .PropertyResolver, org.apache.sshd.common.future.CancelFuture, org.apache.sshd.common.io.DefaultIoConnectFuture, .IoConnectFuture, .IoConnector, .IoHandler, .IoServiceEventListener, .IoSession, org.apache.sshd.common.util.ExceptionUtils, .ValidateUtils, org.apache.sshd.core.CoreModuleProperties

TODO Add javadoc
Author
Apache MINA SSHD Project

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected class

Field Summary

Modifier and TypeField and Description
private final Nio2ServiceFactory
Inherited from org.apache.sshd.common.io.nio2.Nio2Service:
CONFIGURABLE_OPTIONSdisposingpropertyResolversessions

Constructor Summary

AccessConstructor and Description
public
Nio2Connector(Nio2ServiceFactory nio2ServiceFactory, PropertyResolver propertyResolver, IoHandler handler, AsynchronousChannelGroup group, ExecutorService resumeTasks)

Method Summary

Modifier and TypeMethod and Description
public IoConnectFuture
connect(SocketAddress
The target address to connect to
address
,
AttributeRepository
An optional "context" to be attached to the established session if successfully connected
context
,
SocketAddress
The local address to use - if null an automatic ephemeral port and bind address is used
localAddress
)

Implements org.apache.sshd.common.io.IoConnector.connect.

protected Nio2CompletionHandler<Void, Object>
protected Nio2Session
protected AsynchronousSocketChannel
Inherited from org.apache.sshd.common.io.nio2.Nio2Service:
disposegetChannelGroupgetExecutorServicegetInnerCloseablegetIoHandlergetIoServiceEventListenergetManagedSessionssessionClosedsetIoServiceEventListenersetOptionsetSocketOptionsunmapSession

Field Detail

nio2ServiceFactoryback to summary
private final Nio2ServiceFactory nio2ServiceFactory

Constructor Detail

Nio2Connectorback to summary
public Nio2Connector(Nio2ServiceFactory nio2ServiceFactory, PropertyResolver propertyResolver, IoHandler handler, AsynchronousChannelGroup group, ExecutorService resumeTasks)

Method Detail

connectback to summary
public IoConnectFuture connect(SocketAddress address, AttributeRepository context, SocketAddress localAddress)

Implements org.apache.sshd.common.io.IoConnector.connect.

Parameters
address:SocketAddress

Doc from org.apache.sshd.common.io.IoConnector.connect.

The target address to connect to

context:AttributeRepository

Doc from org.apache.sshd.common.io.IoConnector.connect.

An optional "context" to be attached to the established session if successfully connected

localAddress:SocketAddress

Doc from org.apache.sshd.common.io.IoConnector.connect.

The local address to use - if null an automatic ephemeral port and bind address is used

Returns:IoConnectFuture

Doc from org.apache.sshd.common.io.IoConnector.connect.

The future representing the connection request

Annotations
@Override
createConnectionCompletionHandlerback to summary
protected Nio2CompletionHandler<Void, Object> createConnectionCompletionHandler(IoConnectFuture future, AsynchronousSocketChannel socket, AttributeRepository context, PropertyResolver propertyResolver, IoHandler handler)
createSessionback to summary
protected Nio2Session createSession(PropertyResolver propertyResolver, IoHandler handler, AsynchronousSocketChannel socket) throws Throwable
openAsynchronousSocketChannelback to summary
protected AsynchronousSocketChannel openAsynchronousSocketChannel(SocketAddress address, AsynchronousChannelGroup group) throws IOException
org.apache.sshd.common.io.nio2 back to summary

protected Class Nio2Connector.ConnectionCompletionHandler

extends Nio2CompletionHandler<Void, Object>
Class Inheritance

Field Summary

Modifier and TypeField and Description
protected final AttributeRepository
protected final IoConnectFuture
protected final IoHandler
protected final PropertyResolver
protected final AsynchronousSocketChannel

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
protected void
protected void
Inherited from org.apache.sshd.common.io.nio2.Nio2CompletionHandler:
completedfailed

Field Detail

contextback to summary
protected final AttributeRepository context
futureback to summary
protected final IoConnectFuture future
handlerback to summary
protected final IoHandler handler
propertyResolverback to summary
protected final PropertyResolver propertyResolver
socketback to summary
protected final AsynchronousSocketChannel socket

Constructor Detail

ConnectionCompletionHandlerback to summary
protected ConnectionCompletionHandler(IoConnectFuture future, AsynchronousSocketChannel socket, AttributeRepository context, PropertyResolver propertyResolver, IoHandler handler)

Method Detail

onCompletedback to summary
protected void onCompleted(Void result, Object attachment)

Implements abstract org.apache.sshd.common.io.nio2.Nio2CompletionHandler.onCompleted.

Annotations
@Override
@SuppressWarnings:synthetic-access
onFailedback to summary
protected void onFailed(Throwable exc, Object attachment)

Implements abstract org.apache.sshd.common.io.nio2.Nio2CompletionHandler.onFailed.

Annotations
@Override