T
- public class ResponseQueue<T> extends java.lang.Object implements ResponseHandler<T>
Constructor and Description |
---|
ResponseQueue() |
Modifier and Type | Method and Description |
---|---|
Response<T> |
peek() |
Response<T> |
poll() |
Response<T> |
poll(long timeout,
java.util.concurrent.TimeUnit unit) |
void |
q(Response<T> resp) |
int |
queueSize() |
void |
responseException(Response<T> r,
java.lang.Exception e)
Invoked when a command resulted in an exception.
|
void |
responseValue(Response<T> r,
T value)
Invoked when a response arrives.
|
int |
resultsPending() |
Response<T> |
take() |
public void responseValue(Response<T> r, T value)
ResponseHandler
responseValue
in interface ResponseHandler<T>
r
- The response object which issues the eventvalue
- The value of the response.public void responseException(Response<T> r, java.lang.Exception e)
ResponseHandler
responseException
in interface ResponseHandler<T>
r
- The response object which issues the evente
- The exception.public int resultsPending()
public int queueSize()
public Response<T> poll(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
java.lang.InterruptedException