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 and Description |
---|---|
protected RestChannel |
channel |
Modifier | Constructor and Description |
---|---|
protected |
RestActionListener(RestChannel channel) |
Modifier and Type | Method and 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) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onFailure, onResponse, wrap
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>