ActionListener<Response>RestResponseListenerpublic abstract class RestActionListener<Response> extends java.lang.Object implements ActionListener<Response>
processResponse(Object) to be implemented
and will automatically handle failures.| Modifier and Type | Field | Description |
|---|---|---|
protected RestChannel |
channel |
| Modifier | Constructor | Description |
|---|---|---|
protected |
RestActionListener(RestChannel channel) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
onFailure(java.lang.Exception e) |
A failure caused by an exception at some phase of the task.
|
void |
onResponse(Response response) |
Handle action response.
|
protected abstract void |
processResponse(Response response) |
onFailure, onResponse, toBiConsumer, wrap, wrapprotected final RestChannel channel
protected RestActionListener(RestChannel channel)
public final void onResponse(Response response)
ActionListeneronResponse in interface ActionListener<Response>protected abstract void processResponse(Response response) throws java.lang.Exception
java.lang.Exceptionpublic final void onFailure(java.lang.Exception e)
ActionListeneronFailure in interface ActionListener<Response>