Top Description Constructors Methods
org.apache.sshd.client.future

public Class DefaultConnectFuture

extends DefaultCancellableSshFuture<ConnectFuture>
implements ConnectFuture
Class Inheritance
All Implemented Interfaces
org.apache.sshd.client.future.ConnectFuture, org.apache.sshd.common.future.Cancellable, org.apache.sshd.common.future.WithException, org.apache.sshd.common.future.HasException, org.apache.sshd.client.session.ClientSessionHolder, org.apache.sshd.common.session.SessionHolder, org.apache.sshd.common.session.SessionContextHolder, org.apache.sshd.common.future.VerifiableFuture, org.apache.sshd.common.future.SshFuture, org.apache.sshd.common.future.WaitableFuture
Imports
java.io.IOException, java.util.Objects, org.apache.sshd.client.session.ClientSession, org.apache.sshd.common.RuntimeSshException, org.apache.sshd.common.future.CancelOption, .DefaultCancellableSshFuture, org.apache.sshd.common.io.IoSession, org.apache.sshd.common.util.GenericUtils

A default implementation of ConnectFuture.
Author
Apache MINA SSHD Project

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ClientSession
public boolean
public void
setSession(ClientSession session)

Implements org.apache.sshd.client.future.ConnectFuture.setSession.

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

public ConnectFuture
verify(long
Wait timeout in milliseconds
timeout
,
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

If no CancelOptions are given, this behaves as if CancelOption#CANCEL_ON_TIMEOUT and CancelOption#CANCEL_ON_INTERRUPT were set.

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

Constructor Detail

DefaultConnectFutureback to summary
public DefaultConnectFuture(Object id, Object lock)

Method Detail

getSessionback to summary
public ClientSession getSession()

Implements org.apache.sshd.common.session.SessionHolder.getSession.

Annotations
@Override
isConnectedback to summary
public boolean isConnected()

Implements org.apache.sshd.client.future.ConnectFuture.isConnected.

Returns:boolean

Doc from org.apache.sshd.client.future.ConnectFuture.isConnected.

true if the connect operation is finished successfully.

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

Implements org.apache.sshd.client.future.ConnectFuture.setSession.

Doc from org.apache.sshd.client.future.ConnectFuture.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:ClientSession

The ClientSession

Annotations
@Override
verifyback to summary
public ConnectFuture verify(long timeout, 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

If no CancelOptions are given, this behaves as if CancelOption#CANCEL_ON_TIMEOUT and CancelOption#CANCEL_ON_INTERRUPT were set.

Parameters
timeout: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:ConnectFuture

The (same) future instance

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