Uses of Class
com.dlsc.gemsfx.util.ServiceInvocation
Packages that use ServiceInvocation
-
Uses of ServiceInvocation in com.dlsc.gemsfx.util
Methods in com.dlsc.gemsfx.util that return ServiceInvocationModifier and TypeMethodDescriptionstatic <T> ServiceInvocation<T>
ServiceInvocation.create
(String name, ServiceInvocation.ServiceSupplier<T> supplier) Creates a new service invocation instance.ServiceInvocation.onException
(BiConsumer<String, Exception> onException) A consumer that will be invoked in case of an exception during the execution of the service invocation.ServiceInvocation.onExceptionDefault
(BiConsumer<String, Exception> onExceptionDefault) A default consumer that will be invoked in case of an exception during the execution of the service invocation.ServiceInvocation.onFailure
(BiConsumer<String, String> onFailure) A consumer that will be invoked when the backend service invocation was not successful.ServiceInvocation.onFailureDefault
(BiConsumer<String, String> onFailureDefault) A default consumer that will be invoked when the backend service invocation was not successful.ServiceInvocation.onFailureDetailed
(BiConsumer<String, retrofit2.Response> onFailureDetailed) A consumer that will be invoked when the backend service invocation was not successful.ServiceInvocation.onFailureDetailedDefault
(BiConsumer<String, retrofit2.Response> onFailureDetailedDefault) A default consumer that will be invoked when the backend service invocation was not successful.A runnable that will be invoked after the service invocation has completed.A consumer that will be invoked first when theexecute()
method gets invoked.ServiceInvocation.onStatusCode
(HttpStatusCode code, BiConsumer<String, String> onStatusCode) A consumer that will be invoked when the backend returns the given HTTP status code.ServiceInvocation.onStatusCodeDefault
(HttpStatusCode code, BiConsumer<String, String> onStatusCodeDefault) A default consumer that will be invoked when the backend returns the given HTTP status code.A consumer that will be invoked when the backend service invocation was successful.ServiceInvocation.onSuccessDetailed
(Consumer<retrofit2.Response<T>> onSuccessDetailed) A consumer that will be invoked when the backend service invocation was successful.ServiceInvocation.withDelay
(long delay) Introduces an artificial delay for the invocation.ServiceInvocation.withSimulatingFailure
(boolean failure) An easy way to explicitly make the service invocation fail in order to test the handling of failures by the application.