org.simantics.databoard.method
Interface MethodInterface.AsyncResult
- All Known Implementing Classes:
- AsyncResultImpl
- Enclosing interface:
- MethodInterface
public static interface MethodInterface.AsyncResult
setListener
void setListener(MethodInterface.InvokeListener listener)
- Add a listener. It will be notified immediately if the response is
available.
- Parameters:
listener
- (listener may not block) or null to remove listener
getResponse
java.lang.Object getResponse()
- Returns:
- response or null
getExecutionError
java.lang.Object getExecutionError()
getInvokeException
InvokeException getInvokeException()
getStatus
MethodInterface.AsyncRequestStatus getStatus()
waitForResponse
java.lang.Object waitForResponse()
throws InvokeException,
MethodInterface.ExecutionError,
java.lang.InterruptedException
- Returns:
- response
- Throws:
java.lang.InterruptedException
- block was canceled
InvokeException
- network error, e.g. IOException of MethodNotSupportedException
MethodInterface.ExecutionError
- error that occured while executing the method
waitForResponse
java.lang.Object waitForResponse(long timeout,
java.util.concurrent.TimeUnit unit)
throws InvokeException,
MethodInterface.ExecutionError,
java.lang.InterruptedException
- Returns:
- response
- Throws:
java.lang.InterruptedException
InvokeException
- network error, e.g. IOException of MethodNotSupportedException
MethodInterface.ExecutionError
- error that occured while executing the method