|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.sshd.common.future.DefaultSshFuture<T>
public class DefaultSshFuture<T extends SshFuture>
A default implementation of SshFuture.
| Constructor Summary | |
|---|---|
DefaultSshFuture(java.lang.Object lock)
Creates a new instance. |
|
| Method Summary | |
|---|---|
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,
java.util.concurrent.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,
java.util.concurrent.TimeUnit unit)
Wait for the asynchronous operation to complete with the specified timeout uninterruptibly. |
void |
cancel()
|
protected java.lang.Object |
getValue()
Returns the result of the asynchronous operation. |
boolean |
isCanceled()
|
boolean |
isDone()
Returns if the asynchronous operation is completed. |
T |
removeListener(SshFutureListener<T> listener)
Removes an existing event listener so it won't be notified when the future is completed. |
void |
setValue(java.lang.Object newValue)
Sets the result of the asynchronous operation, and mark it as finished. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultSshFuture(java.lang.Object lock)
| Method Detail |
|---|
public T await()
throws java.lang.InterruptedException
await in interface SshFuture<T extends SshFuture>java.lang.InterruptedException
public boolean await(long timeout,
java.util.concurrent.TimeUnit unit)
throws java.lang.InterruptedException
await in interface SshFuture<T extends SshFuture>java.lang.InterruptedException
public boolean await(long timeoutMillis)
throws java.lang.InterruptedException
await in interface SshFuture<T extends SshFuture>java.lang.InterruptedExceptionpublic T awaitUninterruptibly()
awaitUninterruptibly in interface SshFuture<T extends SshFuture>
public boolean awaitUninterruptibly(long timeout,
java.util.concurrent.TimeUnit unit)
awaitUninterruptibly in interface SshFuture<T extends SshFuture>public boolean awaitUninterruptibly(long timeoutMillis)
awaitUninterruptibly in interface SshFuture<T extends SshFuture>public boolean isDone()
isDone in interface SshFuture<T extends SshFuture>public void setValue(java.lang.Object newValue)
protected java.lang.Object getValue()
public T addListener(SshFutureListener<T> listener)
addListener in interface SshFuture<T extends SshFuture>public T removeListener(SshFutureListener<T> listener)
removeListener in interface SshFuture<T extends SshFuture>public boolean isCanceled()
public void cancel()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||