| Constructor and Description |
|---|
PendingResponse(long timeout)
Construct with specified timeout.
|
| Modifier and Type | Method and Description |
|---|---|
void |
done(T response)
Done with valid response and notify that response already received.
|
void |
doneWithInvalidResponse(InvalidResponseException e)
Done with invalid response (negative response/non OK command_status).
|
T |
getResponse()
Get the response.
|
void |
waitDone()
Wait until response receive or timeout already reach.
|
public PendingResponse(long timeout)
timeout - is the timeout in millisecond.public void done(T response) throws IllegalArgumentException
response - is the response.IllegalArgumentException - thrown if response is null.public void doneWithInvalidResponse(InvalidResponseException e)
e - is the InvalidResponseException.public T getResponse()
public void waitDone()
throws ResponseTimeoutException,
InvalidResponseException
ResponseTimeoutException - if timeout reach.InvalidResponseException - if receive invalid response.