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

public Interface VerifiableFuture<T>

Known Direct Subinterfaces
org.apache.sshd.common.io.IoReadFuture, org.apache.sshd.common.io.IoWriteFuture, org.apache.sshd.common.future.CancelFuture
Known Direct Implementers
org.apache.sshd.common.future.DefaultVerifiableSshFuture
Annotations
@FunctionalInterface
Type Parameters
<T>
Type of verification result
Imports
java.io.IOException, java.time.Duration, java.util.concurrent.TimeUnit

Represents an asynchronous operation whose successful result can be verified somehow. The contract guarantees that if the verifyXXX method returns without an exception then the operation was completed successfully
Author
Apache MINA SSHD Project

Method Summary

Modifier and TypeMethod and Description
public default T

Returns:

The (same) future instance
verify
()

Wait Long#MAX_VALUE msec.

public default T

Returns:

The (same) future instance
verify
(CancelOption...
Optional CancelOptions defining the behavior on time-out or interrupt; ignored if the future is not Cancellable.
options
)

Wait Long#MAX_VALUE msec.

public default T

Returns:

The (same) future instance
verify
(long
The number of time units to wait
timeout
,
TimeUnit
The wait TimeUnit
unit
)

Wait and verify that the operation was successful

public default T

Returns:

The (same) future instance
verify
(long
The number of time units to wait
timeout
,
TimeUnit
The wait TimeUnit
unit
,
CancelOption...
Optional CancelOptions defining the behavior on time-out or interrupt; ignored if the future is not Cancellable.
options
)

Wait and verify that the operation was successful

public default T

Returns:

The (same) future instance
verify
(Duration
The maximum duration to wait, null to wait forever
timeout
)

Wait and verify that the operation was successful

public default T

Returns:

The (same) future instance
verify
(Duration
The maximum duration to wait, null to wait forever
timeout
,
CancelOption...
Optional CancelOptions defining the behavior on time-out or interrupt; ignored if the future is not Cancellable.
options
)

Wait and verify that the operation was successful

public default T

Returns:

The (same) future instance
verify
(long
Wait timeout in milliseconds
timeoutMillis
)

Wait and verify that the operation was successful

public T

Returns:

The (same) future instance
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
)

Wait and verify that the operation was successful

Method Detail

verifyback to summary
public default T verify() throws IOException

Wait Long#MAX_VALUE msec. and verify that the operation was successful

Returns:T

The (same) future instance

Exceptions
IOException:
If failed to verify successfully on time
See Also
verify(long, CancelOption[])
verifyback to summary
public default T verify(CancelOption... options) throws IOException

Wait Long#MAX_VALUE msec. and verify that the operation was successful

Parameters
options:CancelOption[]

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

Returns:T

The (same) future instance

Exceptions
IOException:
If failed to verify successfully on time
See Also
verify(long, CancelOption[])
verifyback to summary
public default T verify(long timeout, TimeUnit unit) throws IOException

Wait and verify that the operation was successful

Parameters
timeout:long

The number of time units to wait

unit:TimeUnit

The wait TimeUnit

Returns:T

The (same) future instance

Exceptions
IOException:
If failed to verify successfully on time
See Also
verify(long, CancelOption[])
verifyback to summary
public default T verify(long timeout, TimeUnit unit, CancelOption... options) throws IOException

Wait and verify that the operation was successful

Parameters
timeout:long

The number of time units to wait

unit:TimeUnit

The wait TimeUnit

options:CancelOption[]

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

Returns:T

The (same) future instance

Exceptions
IOException:
If failed to verify successfully on time
See Also
verify(long, CancelOption[])
verifyback to summary
public default T verify(Duration timeout) throws IOException

Wait and verify that the operation was successful

Parameters
timeout:Duration

The maximum duration to wait, null to wait forever

Returns:T

The (same) future instance

Exceptions
IOException:
If failed to verify successfully on time
See Also
verify(long, CancelOption[])
verifyback to summary
public default T verify(Duration timeout, CancelOption... options) throws IOException

Wait and verify that the operation was successful

Parameters
timeout:Duration

The maximum duration to wait, null to wait forever

options:CancelOption[]

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

Returns:T

The (same) future instance

Exceptions
IOException:
If failed to verify successfully on time
See Also
verify(long, CancelOption[])
verifyback to summary
public default T verify(long timeoutMillis) throws IOException

Wait and verify that the operation was successful

Parameters
timeoutMillis:long

Wait timeout in milliseconds

Returns:T

The (same) future instance

Exceptions
IOException:
If failed to verify successfully on time
verifyback to summary
public T verify(long timeoutMillis, CancelOption... options) throws IOException

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:T

The (same) future instance

Exceptions
IOException:
If failed to verify successfully on time