Class ResourceRegistryResponses
java.lang.Object
org.gcube.informationsystem.resourceregistry.api.client.ResourceRegistryResponses
Opt-in executor that associates a client result with immutable response metadata.
- Author:
- Luca Frosini (ISTI - CNR)
-
Method Summary
Modifier and TypeMethodDescription<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 ResourceRegistryResponses
-
Method Details
-
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
-