T
- The type of the interface Consumer
parameter.
public class ConsumerCallback<T>
Represents a callback for an asynchronous task, with a interface Consumer
of T as the success operation.
interface Consumer
Constructor and Description |
---|
ConsumerCallback(Consumer<T> onSuccess,
Consumer<org.ocast.sdk.core.models.OCastError> onError)
Creates an instance of
class ConsumerCallback . |
Modifier and Type | Method and Description |
---|---|
Consumer<org.ocast.sdk.core.models.OCastError> |
getOnError()
The operation executed if the task failed.
|
Consumer<T> |
getOnSuccess()
The operation executed if the task succeeded.
|
public ConsumerCallback(@NotNull Consumer<T> onSuccess, @NotNull Consumer<org.ocast.sdk.core.models.OCastError> onError)
Creates an instance of class ConsumerCallback
.
onSuccess
- The operation executed if the task succeeded.onError
- The operation executed if the task failed.class ConsumerCallback