public class Future<T> extends Object
| Constructor and Description |
|---|
Future() |
| Modifier and Type | Method and Description |
|---|---|
T |
get()
This is a blocking call which waits until the request finishes/an error
occurs.
|
T |
get(long timeoutMs)
This is a blocking call which waits until the request finishes/an error
occurs/or times out.
|
RequestStatus |
getStatus() |
void |
onFailure(JoynrException newException)
Terminates the future in error
|
void |
onSuccess(T result)
Resolves the future using the given result
|
void |
resolve(Object... outParameters) |
public T get(long timeoutMs) throws InterruptedException, JoynrWaitExpiredException, ApplicationException, JoynrRuntimeException
timeoutMs - The maximum number of milliseconds to wait before this request times outInterruptedException - if the thread is interrupted.JoynrWaitExpiredException - if timeout_ms expiresApplicationException - if the request failed with a ApplicationExceptionJoynrRuntimeException - if the request failed with a JoynrRuntimeExceptionpublic T get() throws InterruptedException, JoynrWaitExpiredException, ApplicationException, JoynrRuntimeException
InterruptedException - if the thread is interrupted.JoynrWaitExpiredException - if timeout_ms expiresApplicationException - if the request failed with a ApplicationExceptionJoynrRuntimeException - if the request failed with a JoynrRuntimeExceptionpublic RequestStatus getStatus()
public void onSuccess(T result)
result - the result of the asynchronous callpublic void onFailure(JoynrException newException)
newException - that caused the failurepublic void resolve(Object... outParameters)
Copyright © 2021. All rights reserved.