Skip to main content
Version: SDK 5.0.x

Interface Callback<T>

A callback represents a computation which is awaiting some data to resolve to a result or be rejected with some error.

public interface Callback<T>

Methods

reject

void reject(@NonNull Throwable exception)

Called in case an error which can noy be handled occurs. If this method is called, resolve(Object) will not be called anymore.

Parameters

NameDescription
exceptionThe error which occurred.

resolve

void resolve(T response)

Called after the operation was successful.

Parameters

NameDescription
responseThe data the operation produced.