Package io.stargate.sdk.audit
Interface ServiceCallObserver<RESPONSE,S extends Service,T extends ServiceCallEvent<S>>
- Type Parameters:
RESPONSE- response typeS- service typeT- 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 TypeMethodDescriptionvoidProcess event.voidonCompletion(com.evanlennick.retry4j.Status<RESPONSE> s) Get notified when http execution is donevoidonFailedTry(com.evanlennick.retry4j.Status<RESPONSE> s) On try failed.voidGet notified when error in http call.voidGet notified when the retry is in success.
-
Method Details
-
onCall
Process event.- Parameters:
event- api invocation event
-
onSuccess
Get notified when the retry is in success.- Parameters:
s- invocation details
-
onCompletion
Get notified when http execution is done- Parameters:
s- invocation details
-
onFailure
Get notified when error in http call.- Parameters:
s- invocation details
-
onFailedTry
On try failed.- Parameters:
s- invocation details
-