Class ResourceResponse.Factory

  • Enclosing interface:
    ResourceResponse<T>

    public static class ResourceResponse.Factory
    extends Object
    A factory to create ResourceResponse instances.
    • 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 be null).
        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 be null).
        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 be null).
        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 be null).
        Returns:
        the created ResourceResponse instance.
        Since:
        1.1.1