Package com.sodius.oslc.client.requests
Class ResourceResponse.Factory
- java.lang.Object
-
- com.sodius.oslc.client.requests.ResourceResponse.Factory
-
- Enclosing interface:
- ResourceResponse<T>
public static class ResourceResponse.Factory extends Object
A factory to create ResourceResponse instances.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> ResourceResponse<T>create(T entity)Creates an instance of ResourceResponse.static <T> ResourceResponse<T>create(T entity, ClientResponse response)Creates an instance of ResourceResponse.static <T> ResourceResponse<T>create(T entity, ResourceResponse<?> response)Creates an instance of ResourceResponse.static <T> ResourceResponse<T>create(T entity, MultivaluedMap<String,String> headers)Creates an instance of ResourceResponse.
-
-
-
Method Detail
-
create
public static <T> ResourceResponse<T> create(T entity, ClientResponse response)
Creates an instance of ResourceResponse.- Type Parameters:
T- the type of the entity of the response.- Parameters:
entity- the entity of the response (may benull).response- the underlying client response from which HTTP headers are available.- Returns:
- the created ResourceResponse instance.
-
create
public static <T> ResourceResponse<T> create(T entity, ResourceResponse<?> response)
Creates an instance of ResourceResponse.- Type Parameters:
T- the type of the entity of the response.- Parameters:
entity- the entity of the response (may benull).response- the wrapped ResourceResponse from which HTTP headers are available.- Returns:
- the created ResourceResponse instance.
-
create
public static <T> ResourceResponse<T> create(T entity, MultivaluedMap<String,String> headers)
Creates an instance of ResourceResponse.- Type Parameters:
T- the type of the entity of the response.- Parameters:
entity- the entity of the response (may benull).headers- the HTTP headers of the response.- Returns:
- the created ResourceResponse instance.
- Since:
- 1.1.1
-
create
public static <T> ResourceResponse<T> create(T entity)
Creates an instance of ResourceResponse.- Type Parameters:
T- the type of the entity of the response.- Parameters:
entity- the entity of the response (may benull).- Returns:
- the created ResourceResponse instance.
- Since:
- 1.1.1
-
-