public class ExceptionDelegate extends Object
FusionAuthClient
methods and automatically deals
with the ClientResponse
object for you.Constructor and Description |
---|
ExceptionDelegate() |
Modifier and Type | Method and Description |
---|---|
<T,U> T |
execute(java.util.function.Supplier<com.inversoft.rest.ClientResponse<T,U>> supplier)
Executes the delegated FusionAuthClient call using the given supplier (to make the API call) and handles the response
by returning the success response if the status code was 2xx.
|
public <T,U> T execute(java.util.function.Supplier<com.inversoft.rest.ClientResponse<T,U>> supplier)
FusionAuthClientException
T
- The success response type.U
- The error response type.supplier
- The supplier that should invoke the FusionAuthClient method.FusionAuthClientException
- If the status code was anything exception 2xx or 404 or there was a problem calling
the API (network or something similar).Copyright © 2021. All rights reserved.