BatchResultCallback

public interface BatchResultCallback

The callback interface to return AppSearchBatchResult.

Public Method Summary

abstract void
onResult(AppSearchBatchResult<KeyType, ValueType> result)
Called when AppSearchBatchResult results are ready.
void
onSystemError(Throwable throwable)
Called when a system error occurs.

Public Methods

public abstract void onResult (AppSearchBatchResult<KeyType, ValueType> result)

Called when AppSearchBatchResult results are ready.

Parameters
result The result of the executed request.

public void onSystemError (Throwable throwable)

Called when a system error occurs.

This method is only called the infrastructure is fundamentally broken or unavailable, such that none of the requests could be started. For example, it will be called if the AppSearch service unexpectedly fails to initialize and can't be recovered by any means, or if communicating to the server over Binder fails (for example system service crashed or device is rebooting).

The error is not expected to be recoverable and there is no specific recommended action other than displaying a permanent message to the user.

Normal errors that are caused by invalid inputs or recoverable/retriable situations are reported associated with the input that caused them via the onResult(AppSearchBatchResult) method.

Parameters
throwable an exception describing the system error