Package es.kukenan.smartfi.common.utils
Class RestClientOperationWrapper<T>
java.lang.Object
es.kukenan.smartfi.common.utils.RestClientOperationWrapper<T>
- Type Parameters:
T- the result type of the wrapped operation.
Utils for REST Client operations.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
supplier
The operation to wrap.
-
-
Constructor Details
-
RestClientOperationWrapper
State constructor.- Parameters:
supplier- The operation to wrap.
-
-
Method Details
-
execute
Wrap a rest operation to uniform exception handling.- Returns:
- the return value of the rest operation invocation.
-
message
Construct an error message for a resource access exception.- Parameters:
e- the exception to use to get the error message from.- Returns:
- an error message.
-