D - the result typepublic static class OortObject.Result.Deferred<D> extends java.lang.Object implements OortObject.Result<D>
Implementation of OortObject.Result that allows applications to block,
waiting for the result, via get(long, TimeUnit).
OortObject.Result.Deferred<D>| Constructor and Description |
|---|
Deferred() |
| Modifier and Type | Method and Description |
|---|---|
D |
get(long time,
java.util.concurrent.TimeUnit unit)
Waits for the result to be available for the specified amount of time.
|
void |
onResult(D result)
Callback method invoked when the result is available.
|
public void onResult(D result)
OortObject.ResultCallback method invoked when the result is available.
onResult in interface OortObject.Result<D>result - the result objectpublic D get(long time, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, java.util.concurrent.TimeoutException
Waits for the result to be available for the specified amount of time.
If the wait time elapses, a TimeoutException is thrown, but this
method can be called again to wait more time for the result.
time - the maximum time to waitunit - the time unitjava.lang.InterruptedException - if the thread is interrupted while waitingjava.util.concurrent.TimeoutException - if the time elapses before the result is availableCopyright © 2008–2019 The CometD Project. All rights reserved.