Package io.ably.lib.objects
Interface ObjectsCallback<T>
- Type Parameters:
-
T
- the type of the result returned by the asynchronous operation
public interface ObjectsCallback<T>
Callback interface for handling results of asynchronous Objects operations.
Used for operations like creating LiveMaps/LiveCounters, modifying entries, and retrieving objects.
Callbacks are executed on background threads managed by the Objects system.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onError
(AblyException exception) Called when the asynchronous operation fails.void
Called when the asynchronous operation completes successfully.
-
Method Details
-
onSuccess
Called when the asynchronous operation completes successfully. For modification operations (set, remove, increment), result is typically Void. For creation/retrieval operations, result contains the created/retrieved object.- Parameters:
-
result
- the result of the operation, may be null for modification operations
-
onError
Called when the asynchronous operation fails. The exception contains detailed error information including error codes and messages. Common errors include network issues, authentication failures, and validation errors.- Parameters:
-
exception
- the exception that occurred during the operation
-