T - expected response type.public abstract class CDACallback<T>
extends java.lang.Object
| Constructor and Description |
|---|
CDACallback() |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Cancels the subscription for this callback, onFailure()/onSuccess() methods will not be
called.
|
boolean |
isCancelled() |
protected void |
onFailure(java.lang.Throwable error)
Invoked when a network or unexpected exception occurred during the HTTP request.
|
protected abstract void |
onSuccess(T result)
Successful response.
|
protected abstract void onSuccess(T result)
result - the result of this operation.protected void onFailure(java.lang.Throwable error)
error - the error occurred.public boolean isCancelled()
cancel() was called.public void cancel()
Copyright © 2019 Contentful, GmbH.. All Rights Reserved.