|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Request<RequestIdT,RequestT extends Request<RequestIdT,RequestT,ResponseT>,ResponseT>
A Request intended to be sent via a Messenger. This interfaces only provides for retrieving the id for the request so it can be matched against any replies. It also has methods that are using to indicate if an error has occurred or a timeout has occured.
| Method Summary | |
|---|---|
long |
getDelay(java.util.concurrent.TimeUnit unit)
Indicates how many units of time are remaining until this request times out. |
RequestIdT |
getId()
Returns the id of this request. |
boolean |
isProcessed()
Returns true if this request has already been processed. |
void |
processError(java.lang.Throwable t)
If an error or exception occurs during processing of this request then processError is called with the error or exception object. |
boolean |
processResponse(ResponseT reply)
Tell the request about a reply that come in with matched ids. |
RequestT |
processTimeout()
Notify this request that no reply has come in before its timeout has elapsed. |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Method Detail |
|---|
RequestIdT getId()
long getDelay(java.util.concurrent.TimeUnit unit)
getDelay in interface java.util.concurrent.Delayedboolean processResponse(ResponseT reply)
RequestT processTimeout()
void processError(java.lang.Throwable t)
boolean isProcessed()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||