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

public Interface AuthFuture

extends SshFuture<AuthFuture>, VerifiableFuture<AuthFuture>, Cancellable
Known Direct Implementers
org.apache.sshd.client.future.DefaultAuthFuture
Imports
org.apache.sshd.common.future.Cancellable, .SshFuture, .VerifiableFuture

An SshFuture for asynchronous authentication requests.
Author
Apache MINA SSHD Project

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

false if the authentication operation failed

Note

the operation is considered failed if an exception is received instead of a success/fail response code or the operation is in progress. Should check isDone() in order to ensure that the result is valid.

isFailure
()

public boolean

Returns:

true if the authentication operation is finished successfully

Note

calling this method while the operation is in progress returns false. Should check isDone() in order to ensure that the result is valid.

isSuccess
()

public void
setAuthed(boolean
Authentication success state
authed
)

Notifies that the session has been authenticated.

public void
setCancellable(boolean
whether this future is currently cancellable
cancellable
)

Enables or disables cancellation of this AuthFuture.

public boolean

Returns:

true if cancel() was called, false otherwise
wasCanceled
()

Tells whether cancel() was called on this AuthFuture.

Inherited from org.apache.sshd.common.future.Cancellable:
cancelgetCancellationisCanceled
Inherited from org.apache.sshd.common.future.SshFuture:
addListenerremoveListener
Inherited from org.apache.sshd.common.future.VerifiableFuture:
verifyverifyverifyverifyverifyverifyverifyverify

Method Detail

isFailureback to summary
public boolean isFailure()
Returns:boolean

false if the authentication operation failed

Note

the operation is considered failed if an exception is received instead of a success/fail response code or the operation is in progress. Should check isDone() in order to ensure that the result is valid.

isSuccessback to summary
public boolean isSuccess()
Returns:boolean

true if the authentication operation is finished successfully

Note

calling this method while the operation is in progress returns false. Should check isDone() in order to ensure that the result is valid.

setAuthedback to summary
public void setAuthed(boolean authed)

Notifies that the session has been authenticated. This method is invoked by SSHD internally. Please do not call this method directly.

Parameters
authed:boolean

Authentication success state

setCancellableback to summary
public void setCancellable(boolean cancellable)

Enables or disables cancellation of this AuthFuture.

This is a framework method; do not call directly.

Parameters
cancellable:boolean

whether this future is currently cancellable

wasCanceledback to summary
public boolean wasCanceled()

Tells whether cancel() was called on this AuthFuture.

This is different from isCanceled(). Canceling an on-going authentication may not be possible; cancel() is only a request to cancel the authentication. That request may not be honored and the CancelFuture may actually be isCanceled() == false. AuthFuture.isCanceled() is then false, too.

Returns:boolean

true if cancel() was called, false otherwise