Top Description Constructors Methods
org.apache.sshd.common.io

public Class DefaultIoConnectFuture

extends DefaultCancellableSshFuture<IoConnectFuture>
implements IoConnectFuture
Class Inheritance
All Implemented Interfaces
org.apache.sshd.common.io.IoConnectFuture, org.apache.sshd.common.future.Cancellable, org.apache.sshd.common.future.WithException, org.apache.sshd.common.future.HasException, org.apache.sshd.common.future.SshFuture, org.apache.sshd.common.future.WaitableFuture
Imports
java.io.IOException, org.apache.sshd.common.SshException, org.apache.sshd.common.future.CancelOption, .DefaultCancellableSshFuture

A default implementation of an IoConnectFuture.
Author
Apache MINA SSHD Project

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public IoSession
public boolean
public void
setSession(IoSession
The connected IoSession
session
)

Implements org.apache.sshd.common.io.IoConnectFuture.setSession.

Sets the newly connected session and notifies all threads waiting for this future.

public IoConnectFuture
verify(long
Wait timeout in milliseconds
timeoutMillis
,
CancelOption...
Optional CancelOptions defining the behavior on time-out or interrupt; ignored if the future is not Cancellable.
options
)

Implements org.apache.sshd.common.future.VerifiableFuture.verify.

Wait and verify that the operation was successful

Inherited from org.apache.sshd.common.future.DefaultCancellableSshFuture:
cancelcreateCancellationgetCancellationgetExceptionisCanceledsetException

Constructor Detail

DefaultIoConnectFutureback to summary
public DefaultIoConnectFuture(Object id, Object lock)

Method Detail

getSessionback to summary
public IoSession getSession()

Implements org.apache.sshd.common.io.IoConnectFuture.getSession.

Returns:IoSession

Doc from org.apache.sshd.common.io.IoConnectFuture.getSession.

The current IoSession - may be null if connect operation not finished yet or attempt has failed

Annotations
@Override
isConnectedback to summary
public boolean isConnected()

Implements org.apache.sshd.common.io.IoConnectFuture.isConnected.

Returns:boolean

Doc from org.apache.sshd.common.io.IoConnectFuture.isConnected.

true if the connect operation is finished successfully.

Annotations
@Override
setSessionback to summary
public void setSession(IoSession session)

Implements org.apache.sshd.common.io.IoConnectFuture.setSession.

Doc from org.apache.sshd.common.io.IoConnectFuture.setSession.

Sets the newly connected session and notifies all threads waiting for this future. This method is invoked by SSHD internally. Please do not call this method directly.

Parameters
session:IoSession

The connected IoSession

Annotations
@Override
verifyback to summary
public IoConnectFuture verify(long timeoutMillis, CancelOption... options) throws IOException

Implements org.apache.sshd.common.future.VerifiableFuture.verify.

Doc from org.apache.sshd.common.future.VerifiableFuture.verify.

Wait and verify that the operation was successful

Parameters
timeoutMillis:long

Wait timeout in milliseconds

options:CancelOption[]

Optional CancelOptions defining the behavior on time-out or interrupt; ignored if the future is not Cancellable.

Returns:IoConnectFuture

The (same) future instance

Annotations
@Override
Exceptions
IOException:
If failed to verify successfully on time