Class ResourceRegistryResponses
- java.lang.Object
-
- org.gcube.informationsystem.resourceregistry.api.client.ResourceRegistryResponses
-
public final class ResourceRegistryResponses extends Object
Opt-in executor that associates a client result with immutable response metadata.- Author:
- Luca Frosini (ISTI - CNR)
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> ResourceRegistryResponse<T>execute(ResourceRegistryCall<T> call)Executes one ordinary client call through its existing transport path.<T> ResourceRegistryResponse<T>execute(ResourceRegistryRequestOptions options, ResourceRegistryCall<T> call)Executes one ordinary client call with immutable invocation-specific options.static ResourceRegistryResponsesgetInstance()
-
-
-
Method Detail
-
getInstance
public static ResourceRegistryResponses getInstance()
- Returns:
- the stateless response executor
-
execute
public <T> ResourceRegistryResponse<T> execute(ResourceRegistryCall<T> call) throws ResourceRegistryException
Executes one ordinary client call through its existing transport path. A call satisfied entirely by a client cache returns an explicitly cache-backed response with no fabricated HTTP status or headers.- Type Parameters:
T- result type- Parameters:
call- operation to execute- Returns:
- immutable server- or cache-backed response
- Throws:
ResourceRegistryException- if the operation fails
-
execute
public <T> ResourceRegistryResponse<T> execute(ResourceRegistryRequestOptions options, ResourceRegistryCall<T> call) throws ResourceRegistryException
Executes one ordinary client call with immutable invocation-specific options. Values in the options object override matching client-wide defaults for that invocation only.- Type Parameters:
T- result type- Parameters:
options- invocation-specific optionscall- operation to execute- Returns:
- immutable server- or cache-backed response
- Throws:
ResourceRegistryException- if the operation fails
-
-