Package com.sodius.oslc.client.requests
Class GetPublisher
java.lang.Object
- All Implemented Interfaces:
ResourceRequest<ResourceResponse<Publisher>>,Callable<ResourceResponse<Publisher>>
Executes a GET request to read a
Publisher instance.
The publisher URI is usually given by a ServiceProvider or RootServices.
- Since:
- 1.4.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGetPublisher(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
Modifier and TypeMethodDescriptionprotected 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, getMethods inherited from class com.sodius.oslc.client.requests.AbstractResourceRequest
call, createErrorResponse, createResourceResponse, getClient, getUri
-
Constructor Details
-
GetPublisher
Creates a new instance to execute a GET on the specified publisher location.- Parameters:
uri- the publisher location
-
GetPublisher
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 Details
-
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.
-