Package com.sodius.oslc.server.requests
Class GetProxyResource
- java.lang.Object
-
- com.sodius.oslc.server.requests.WebAppResourceRequest<Response>
-
- com.sodius.oslc.server.requests.GetProxyResource
-
- All Implemented Interfaces:
ResourceRequest<Response>,Callable<Response>
public class GetProxyResource extends WebAppResourceRequest<Response>
Executes a GET request on an OSLC resource.An
OSLC-Core-Versionheader is set to2.0, as the GET is expected to execute on an OSLC resource.This request returns a generic
Response, as callers may not know the exact type of response to expect.- Since:
- 1.3.0
-
-
Constructor Summary
Constructors Constructor Description GetProxyResource(HttpServletRequest request, URI uri)Creates a new instance to execute a GET on the specified resource.GetProxyResource(HttpServletRequest request, URI uri, String acceptType)Creates a new instance to execute a GET on the specified resource.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Responsecall(OslcClient client)Executes a GET request on the resource.-
Methods inherited from class com.sodius.oslc.server.requests.WebAppResourceRequest
call, call
-
-
-
-
Constructor Detail
-
GetProxyResource
public GetProxyResource(HttpServletRequest request, URI uri)
Creates a new instance to execute a GET on the specified resource.An
Acceptheader is set toapplication/rdf+xml, as this is the most frequently used exchange format.- Parameters:
request- the HTTP request used to obtain a REST clienturi- the URI used for the underlying request
-
GetProxyResource
public GetProxyResource(HttpServletRequest request, URI uri, String acceptType)
Creates a new instance to execute a GET on the specified resource.- Parameters:
request- the HTTP request used to obtain a REST clienturi- the URI used for the underlying requestacceptType- the value of theAcceptheaders to use
-
-
Method Detail
-
call
protected Response call(OslcClient client)
Executes a GET request on the resource.An
OSLC-Core-Versionheader is set to2.0, as the GET is expected to execute on an OSLC resource.- Specified by:
callin classWebAppResourceRequest<Response>- Parameters:
client- the client to use to execute the request.- Returns:
- a generic
Responseobject
-
-