public abstract class RestActionListener<Response> extends 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(Throwable e)
A failure handler.
|
void |
onResponse(Response response)
A response handler.
|
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 Exception
Exception
public final void onFailure(Throwable e)
ActionListener
onFailure
in interface ActionListener<Response>
Copyright © 2009–2016. All rights reserved.