Package com.sodius.oslc.client.requests
Class GetPublisher
- java.lang.Object
-
- com.sodius.oslc.client.requests.AbstractResourceRequest<ResourceResponse<T>>
-
- com.sodius.oslc.client.requests.GetResource<Publisher>
-
- com.sodius.oslc.client.requests.GetPublisher
-
- All Implemented Interfaces:
ResourceRequest<ResourceResponse<Publisher>>,Callable<ResourceResponse<Publisher>>
public class GetPublisher extends GetResource<Publisher>
Executes a GET request to read aPublisherinstance.The publisher URI is usually given by a
ServiceProviderorRootServices.- Since:
- 1.4.0
- See Also:
GetServiceProvider,GetRootServices
-
-
Constructor Summary
Constructors Constructor Description GetPublisher(OslcClient client, URI uri)Creates a new instance to execute a GET on the specified publisher location, using the given client.GetPublisher(URI uri)Creates a new instance to execute a GET on the specified publisher location.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ResourceResponse<Publisher>createResponse(OslcResource resource, ClientResponse response)Extracts aResourceResponseinstance from the obtained HTTP response.-
Methods inherited from class com.sodius.oslc.client.requests.GetResource
call, get
-
Methods inherited from class com.sodius.oslc.client.requests.AbstractResourceRequest
call, createErrorResponse, createResourceResponse, getClient, getUri
-
-
-
-
Constructor Detail
-
GetPublisher
public GetPublisher(URI uri)
Creates a new instance to execute a GET on the specified publisher location.- Parameters:
uri- the publisher location
-
GetPublisher
public GetPublisher(OslcClient client, URI uri)
Creates a new instance to execute a GET on the specified publisher location, using the given client.The client must be
unauthenticated, as publisher is an authorization-free resource, and some servers may reject requests providing an Authorization header. The client may be customized usingOslcClientFactoryfor specific parameters, like a proxy configuration.- Parameters:
client- the client to useuri- the publisher location- Since:
- 3.5.1
-
-
Method Detail
-
createResponse
protected ResourceResponse<Publisher> createResponse(OslcResource resource, ClientResponse response)
Description copied from class:GetResourceExtracts aResourceResponseinstance from the obtained HTTP response. The response contains the response headers, from which theETagheader can be extracted in case this request is to follow by aPUT.- Overrides:
createResponsein classGetResource<Publisher>- 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.
-
-