Class GetServiceProvider

    • Constructor Detail

      • GetServiceProvider

        public GetServiceProvider​(OslcClient client,
                                  URI uri)
    • Method Detail

      • createResponse

        protected ResourceResponse<ServiceProvider> createResponse​(OslcResource resource,
                                                                   ClientResponse response)
        Description copied from class: GetResource
        Extracts a ResourceResponse instance from the obtained HTTP response. The response contains the response headers, from which the ETag header can be extracted in case this request is to follow by a PUT.
        Overrides:
        createResponse in class GetResource<ServiceProvider>
        Parameters:
        resource - the resource on which a request is executed.
        response - the response obtained.
        Returns:
        the extraction of the response content into the expected format.
      • createErrorResponse

        protected ResourceResponse<ServiceProvider> createErrorResponse​(OslcResource resource,
                                                                        ClientResponse response)
        Description copied from class: AbstractResourceRequest
        Processes the error response obtained when executing a request on the specified resource. Due to the contract of the ResourceRequest interface, this method is called when the HTTP response status is anything but 20x.

        The default implementation raises a ClientWebException. Subclasses may override for example to return a default entity instead of throwing an exception.

        Overrides:
        createErrorResponse in class AbstractResourceRequest<ResourceResponse<ServiceProvider>>
        Parameters:
        resource - the resource on which a request is executed.
        response - the error response obtained.
        Returns:
        a default entity or an entity extracted from the error response, if any.