public static class ResourceResponse.Factory extends Object
Constructor and Description |
---|
Factory() |
Modifier and Type | Method and 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,
MultivaluedMap<String,String> headers)
Creates an instance of ResourceResponse.
|
static <T> ResourceResponse<T> |
create(T entity,
ResourceResponse<?> response)
Creates an instance of ResourceResponse.
|
public static <T> ResourceResponse<T> create(T entity, ClientResponse response)
T
- the type of the entity of the response.entity
- the entity of the response (may be null
).response
- the underlying client response from which HTTP headers are available.public static <T> ResourceResponse<T> create(T entity, ResourceResponse<?> response)
T
- the type of the entity of the response.entity
- the entity of the response (may be null
).response
- the wrapped ResourceResponse from which HTTP headers are available.public static <T> ResourceResponse<T> create(T entity, MultivaluedMap<String,String> headers)
T
- the type of the entity of the response.entity
- the entity of the response (may be null
).headers
- the HTTP headers of the response.public static <T> ResourceResponse<T> create(T entity)
T
- the type of the entity of the response.entity
- the entity of the response (may be null
).