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 IRestServiceOpenShiftExceptionpublic RestResponse request(Link link, int timeout, IRestResponseFactory responseFactory, List<Parameter> urlPathParameters, List<Parameter> urlParameters, Parameter... parameters) throws OpenShiftException
request in interface IRestServiceOpenShiftExceptionpublic RestResponse request(Link link, int timeout, IMediaType requestMediaType, IRestResponseFactory responseFactory, List<Parameter> urlPathParameter, List<Parameter> urlParameters, Parameter... parameters) throws OpenShiftException
IRestServicerequest in interface IRestServicelink - 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)OpenShiftExceptionLink,
Parameter,
IMediaType,
IHttpClient.NO_TIMEOUT,
IHttpClient.SYSPROP_DEFAULT_CONNECT_TIMEOUT,
IHttpClient.SYSPROP_DEFAULT_READ_TIMEOUT,
IHttpClient.SYSPROP_OPENSHIFT_CONNECT_TIMEOUT,
IHttpClient.DEFAULT_READ_TIMEOUTpublic String getServiceUrl()
IRestServicegetServiceUrl in interface IRestServicepublic String getPlatformUrl()
IRestServicegetPlatformUrl in interface IRestServiceCopyright © 2016 JBoss by Red Hat. All rights reserved.