Interface ServiceCallObserver<RESPONSE,S extends Service,T extends ServiceCallEvent<S>>

Type Parameters:
RESPONSE - response type
S - service type
T - event handler
All Known Implementing Classes:
AnsiLoggerObserverHttp, AnsiLoggerObserverHttpLight, ServiceCallObserverAnsiLogger

public interface ServiceCallObserver<RESPONSE,S extends Service,T extends ServiceCallEvent<S>>
If register in the HttpApisClient, will be triggered asynchronously
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onCall(T event)
    Process event.
    void
    onCompletion(com.evanlennick.retry4j.Status<RESPONSE> s)
    Get notified when http execution is done
    void
    onFailedTry(com.evanlennick.retry4j.Status<RESPONSE> s)
    On try failed.
    void
    onFailure(com.evanlennick.retry4j.Status<RESPONSE> s)
    Get notified when error in http call.
    void
    onSuccess(com.evanlennick.retry4j.Status<RESPONSE> s)
    Get notified when the retry is in success.
  • Method Details

    • onCall

      void onCall(T event)
      Process event.
      Parameters:
      event - api invocation event
    • onSuccess

      void onSuccess(com.evanlennick.retry4j.Status<RESPONSE> s)
      Get notified when the retry is in success.
      Parameters:
      s - invocation details
    • onCompletion

      void onCompletion(com.evanlennick.retry4j.Status<RESPONSE> s)
      Get notified when http execution is done
      Parameters:
      s - invocation details
    • onFailure

      void onFailure(com.evanlennick.retry4j.Status<RESPONSE> s)
      Get notified when error in http call.
      Parameters:
      s - invocation details
    • onFailedTry

      void onFailedTry(com.evanlennick.retry4j.Status<RESPONSE> s)
      On try failed.
      Parameters:
      s - invocation details