|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.veriplace.client.AsyncCapableAPI<TRequestStatus>
public abstract class AsyncCapableAPI<TRequestStatus extends AsyncRequestStatus>
Base class for Veriplace APIs that deliver an asynchronous response. The response may be posted to a callback URL, or the application may poll for it, or both. Depending on the API, there may also be a synchronous equivalent.
| Method Summary | |
|---|---|
TRequestStatus |
getCallbackResult(HttpServletRequest request,
HttpServletResponse response)
Process the parameters of an HTTP callback request that was posted from Veriplace in response to an asynchronous request. |
TRequestStatus |
getResult(TRequestStatus request)
Attempt to retrieve the result of an asynchronous request that was previously submitted with GetLocationAPI.requestLocation(Token, User, String, String)
or InvitationAPI.inviteGetLocation(String, String, boolean). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public TRequestStatus getResult(TRequestStatus request)
throws RequestNotFoundException,
UnexpectedException
GetLocationAPI.requestLocation(Token, User, String, String)
or InvitationAPI.inviteGetLocation(String, String, boolean). Use
this method if you did not specify a callback URI in the original request.
If the request is still in progress, this will return the same request
status object. If the request has completed, either successfully or
unsuccessfully, it will return an updated request status object whose
AsyncRequestStatus.isReady() method will return true, and whose
other properties will describe the result.
request - the request status object that was returned by the
original asynchronous request method
RequestNotFoundException - if the request is no longer valid, i.e.
it has expired or the result was already delivered via a callback
notification
UnexpectedException - if there was an unexpected OAuth error or
I/O error, or if the request is no longer valid
public TRequestStatus getCallbackResult(HttpServletRequest request,
HttpServletResponse response)
throws UnexpectedException
To confirm receipt of the callback, this method also sends an immediate HTTP 200 ("OK") response to Veriplace, completing the HTTP response. Do not try to do anything else with the response object after this; if your application returned anything else, or did not respond, Veriplace would repeat the callback.
request - the current HTTP requestresponse - the current HTTP response (see above)
UnexpectedException - if the request did not contain valid
parameters
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||