|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AsyncRequest
Delayed response object. The result or error may be or become available to this object at any given time. This interface is intended to be used by clients that make service requests over command channel.
Nested Class Summary | |
---|---|
static interface |
AsyncRequest.RequestListener
|
static class |
AsyncRequest.Status
Get the current request status. |
Method Summary | |
---|---|
java.lang.Exception |
getError()
Get error if available. |
java.lang.Object |
getResult(Binding binding)
Get result if available. |
AsyncRequest.Status |
getStatus()
|
void |
setListener(AsyncRequest.RequestListener listener)
Set a listener. |
java.lang.Object |
waitForResult(Binding binding)
Synchronous wait for result until default timeout. |
java.lang.Object |
waitForResult(Binding binding,
long timeout,
java.util.concurrent.TimeUnit unit)
Wait for result or break after until timeout. |
Method Detail |
---|
AsyncRequest.Status getStatus()
java.lang.Object getResult(Binding binding) throws RequestException
binding
-
RequestException
java.lang.Exception getError()
IOException
o Timeout TimeoutException
o Service(handler) problem ServiceException
java.lang.Object waitForResult(Binding binding) throws RequestException
binding
- the format for the result
RequestException
java.lang.Object waitForResult(Binding binding, long timeout, java.util.concurrent.TimeUnit unit) throws RequestException
binding
- timeout
- unit
-
RequestException
void setListener(AsyncRequest.RequestListener listener)
listener
- (listener may not block) or null to remove listener
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |