public class RestService extends Object implements IRestService
SERVICE_PATH, SERVICE_VERSION
Modifier | Constructor and Description |
---|---|
|
RestService(String server,
String clientId,
IMediaType defaultRequestMediaType,
String acceptedMediaType,
IRestResponseFactory factory,
IHttpClient client) |
protected |
RestService(String server,
String clientId,
IMediaType defaultRequestMediaType,
String acceptedMediaType,
IRestResponseFactory factory,
IHttpClient client,
RestServiceProperties properties) |
protected |
RestService(String server,
String clientId,
String protocolVersion,
IMediaType defaultRequestMediaType,
String acceptedMediaType,
IRestResponseFactory factory,
IHttpClient client,
RestServiceProperties properties) |
Modifier and Type | Method and Description |
---|---|
String |
getPlatformUrl()
Returns the OpenShift server.
|
String |
getServiceUrl()
Returns the url for the OpenShift service, the endpoint which this rest
service class is talking to.
|
RestResponse |
request(Link link,
int timeout,
IMediaType requestMediaType,
IRestResponseFactory responseFactory,
List<Parameter> urlPathParameter,
List<Parameter> urlParameters,
Parameter... parameters)
Requests the given link sending the given parameters while encoding the
parameters with the given media type and respecting the given timeout.
|
RestResponse |
request(Link link,
int timeout,
IRestResponseFactory responseFactory,
List<Parameter> urlPathParameters,
List<Parameter> urlParameters,
Parameter... parameters) |
RestResponse |
request(Link link,
int timeout,
List<Parameter> urlPathParameters,
List<Parameter> urlParameters,
Parameter... parameters) |
public RestService(String server, String clientId, IMediaType defaultRequestMediaType, String acceptedMediaType, IRestResponseFactory factory, IHttpClient client)
protected RestService(String server, String clientId, IMediaType defaultRequestMediaType, String acceptedMediaType, IRestResponseFactory factory, IHttpClient client, RestServiceProperties properties)
protected RestService(String server, String clientId, String protocolVersion, IMediaType defaultRequestMediaType, String acceptedMediaType, IRestResponseFactory factory, IHttpClient client, RestServiceProperties properties)
public RestResponse request(Link link, int timeout, List<Parameter> urlPathParameters, List<Parameter> urlParameters, Parameter... parameters) throws OpenShiftException
request
in interface IRestService
OpenShiftException
public RestResponse request(Link link, int timeout, IRestResponseFactory responseFactory, List<Parameter> urlPathParameters, List<Parameter> urlParameters, Parameter... parameters) throws OpenShiftException
request
in interface IRestService
OpenShiftException
public RestResponse request(Link link, int timeout, IMediaType requestMediaType, IRestResponseFactory responseFactory, List<Parameter> urlPathParameter, List<Parameter> urlParameters, Parameter... parameters) throws OpenShiftException
IRestService
request
in interface IRestService
link
- the link to usetimeout
- the timeout in millis (or IHttpClient.NO_TIMEOUT
)urlPathParameter
- the parameters in the url ("/applications/:applicationname")urlParameters
- the url parameters ("?parameter=value")parameters
- the body parameters (ingnored for GET requests)OpenShiftException
Link
,
Parameter
,
IMediaType
,
IHttpClient.NO_TIMEOUT
,
IHttpClient.SYSPROP_DEFAULT_CONNECT_TIMEOUT
,
IHttpClient.SYSPROP_DEFAULT_READ_TIMEOUT
,
IHttpClient.SYSPROP_OPENSHIFT_CONNECT_TIMEOUT
,
IHttpClient.DEFAULT_READ_TIMEOUT
public String getServiceUrl()
IRestService
getServiceUrl
in interface IRestService
public String getPlatformUrl()
IRestService
getPlatformUrl
in interface IRestService
Copyright © 2019 JBoss by Red Hat. All rights reserved.