Interface GenericCallBack<T>

Type Parameters:
T - The type of data returned in case of success.

public interface GenericCallBack<T>
A generic callback interface to handle API responses.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    error(String error)
    Called when the operation fails.
    void
    success(T data)
    Called when the operation is successful.
  • Method Details

    • success

      void success(T data)
      Called when the operation is successful.
      Parameters:
      data - The data returned from the operation.
    • error

      void error(String error)
      Called when the operation fails.
      Parameters:
      error - The error message.