ActionListener<Response>
RestResponseListener
public 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) |
protected final RestChannel channel
protected RestActionListener(RestChannel channel)
public final void onResponse(Response response)
ActionListener
onResponse
in interface ActionListener<Response>
protected abstract void processResponse(Response response) throws java.lang.Exception
java.lang.Exception
public final void onFailure(java.lang.Exception e)
ActionListener
onFailure
in interface ActionListener<Response>