Interface FeatureToggle.Callback_Data<T>

Type Parameters:
T - The type of data expected in the success callback.
Enclosing class:
FeatureToggle

public static interface FeatureToggle.Callback_Data<T>
Interface defining a generic callback mechanism for handling asynchronous operations. This interface allows handling both successful results and error responses.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onError(String errorMessage)
    Called when the asynchronous operation fails or encounters an error.
    void
    onSuccess(T data)
    Called when the asynchronous operation completes successfully.
  • Method Details

    • onSuccess

      void onSuccess(T data)
      Called when the asynchronous operation completes successfully.
      Parameters:
      data - The data returned from the operation.
    • onError

      void onError(String errorMessage)
      Called when the asynchronous operation fails or encounters an error.
      Parameters:
      errorMessage - A message describing the error.