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

public Interface SshFuture<T extends SshFuture<T>>

extends WaitableFuture
Known Direct Subinterfaces
org.apache.sshd.common.io.IoConnectFuture, org.apache.sshd.common.io.IoReadFuture, org.apache.sshd.common.io.IoWriteFuture, org.apache.sshd.common.future.CancelFuture, org.apache.sshd.common.future.CloseFuture
Known Direct Implementers
org.apache.sshd.common.future.AbstractSshFuture
Type Parameters
<T>
Type of future

Represents the completion of an asynchronous SSH operation on a given object (it may be an SSH session or an SSH channel). Can be listened for completion using a SshFutureListener.
Author
Apache MINA SSHD Project

Method Summary

Modifier and TypeMethod and Description
public T

Returns:

The future instance
addListener
(SshFutureListener<T>
The SshFutureListener instance to add
listener
)

Adds an event listener which is notified when this future is completed.

public T

Returns:

The future instance
removeListener
(SshFutureListener<T>
The SshFutureListener instance to remove
listener
)

Removes an existing event listener so it won't be notified when the future is completed.

Inherited from org.apache.sshd.common.future.WaitableFuture:
awaitawaitawaitawaitawaitawaitawaitawaitawaitUninterruptiblyawaitUninterruptiblyawaitUninterruptiblyawaitUninterruptiblyawaitUninterruptiblyawaitUninterruptiblyawaitUninterruptiblyawaitUninterruptiblygetIdisDone

Method Detail

addListenerback to summary
public T addListener(SshFutureListener<T> listener)

Adds an event listener which is notified when this future is completed. If the listener is added after the completion, the listener is directly notified.

Parameters
listener:SshFutureListener<T>

The SshFutureListener instance to add

Returns:T

The future instance

removeListenerback to summary
public T removeListener(SshFutureListener<T> listener)

Removes an existing event listener so it won't be notified when the future is completed.

Parameters
listener:SshFutureListener<T>

The SshFutureListener instance to remove

Returns:T

The future instance