public class EventWait extends APIServlet.APIRequestHandler
The EventWait API will wait for one of the server events registered by EventRegister. EventWait will return immediately if one or more events have occurred since the last time EventWait was called. All pending events will be returned in a single response. The events remain registered so successive calls to EventWait can be made without another call to EventRegister.
Only one EventWait can be outstanding for the same network address. If a second EventWait is issued, the current EventWait will be replaced by the new EventWait.
Request parameters:
Response parameters:
Error Response parameters:
Event object:
Event names:
Event object identifiers:
DESCRIPTION_FIELD, MESSAGE_FIELD, NAME_FIELD
Modifier and Type | Method and Description |
---|---|
protected boolean |
allowRequiredBlockParameters()
No required block parameters
|
protected org.json.simple.JSONStreamAware |
processRequest(javax.servlet.http.HttpServletRequest req)
Process the EventWait API request
The response will be returned immediately if there are any
pending events.
|
protected boolean |
requirePost() |
getAPITags, getFileParameter, getParameters, processRequest, requireBlockchain, requireFullClient, requirePassword, startDbTransaction
protected org.json.simple.JSONStreamAware processRequest(javax.servlet.http.HttpServletRequest req)
processRequest
in class APIServlet.APIRequestHandler
req
- API requestprotected final boolean requirePost()
requirePost
in class APIServlet.APIRequestHandler
protected boolean allowRequiredBlockParameters()
allowRequiredBlockParameters
in class APIServlet.APIRequestHandler