public interface SshFuture<T extends SshFuture>
SshFutureListener.| Modifier and Type | Method and Description |
|---|---|
T |
addListener(SshFutureListener<T> listener)
Adds an event listener which is notified when
this future is completed.
|
T |
await()
Wait for the asynchronous operation to complete.
|
boolean |
await(long timeoutMillis)
Wait for the asynchronous operation to complete with the specified timeout.
|
boolean |
await(long timeout,
TimeUnit unit)
Wait for the asynchronous operation to complete with the specified timeout.
|
T |
awaitUninterruptibly()
Wait for the asynchronous operation to complete uninterruptibly.
|
boolean |
awaitUninterruptibly(long timeoutMillis)
Wait for the asynchronous operation to complete with the specified timeout
uninterruptibly.
|
boolean |
awaitUninterruptibly(long timeout,
TimeUnit unit)
Wait for the asynchronous operation to complete with the specified timeout
uninterruptibly.
|
boolean |
isDone() |
T |
removeListener(SshFutureListener<T> listener)
Removes an existing event listener so it won't be notified when
the future is completed.
|
T await() throws IOException
this instanceIOException - if failed - specifically InterruptedIOException
if waiting was interruptedboolean await(long timeout,
TimeUnit unit)
throws IOException
timeout - The number of time units to waitunit - The TimeUnit for waitingtrue if the operation is completed.IOException - if failed - specifically InterruptedIOException
if waiting was interruptedboolean await(long timeoutMillis)
throws IOException
timeoutMillis - Wait time in millisecondstrue if the operation is completed.IOException - if failed - specifically InterruptedIOException
if waiting was interruptedT awaitUninterruptibly()
boolean awaitUninterruptibly(long timeout,
TimeUnit unit)
timeout - The number of time units to waitunit - The TimeUnit for waitingtrue if the operation is completed.boolean awaitUninterruptibly(long timeoutMillis)
timeoutMillis - Wait time in millisecondstrue if the operation is finished.boolean isDone()
true if the asynchronous operation is completed.T addListener(SshFutureListener<T> listener)
listener - The SshFutureListener instance to addT removeListener(SshFutureListener<T> listener)
listener - The SshFutureListener instance to removeCopyright © 2008–2015 The Apache Software Foundation. All rights reserved.