OpenShift Java Client 2.5.0.Final

com.openshift.internal.client
Class RestService

java.lang.Object
  extended by com.openshift.internal.client.RestService
All Implemented Interfaces:
IRestService

public class RestService
extends Object
implements IRestService

Author:
André Dietisheim

Field Summary
 
Fields inherited from interface com.openshift.internal.client.IRestService
SERVICE_PATH, SERVICE_VERSION
 
Constructor Summary
  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)
           
 
Method Summary
 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, 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, List<Parameter> urlParameters, IMediaType requestMediaType, Parameter... parameters)
           
 RestResponse request(Link link, int timeout, List<Parameter> urlParameters, Parameter... parameters)
           
 RestResponse request(Link link, int timeout, Parameter... parameters)
           
 RestResponse request(Link link, List<Parameter> urlParameters, Parameter... parameters)
           
 RestResponse request(Link link, Parameter... parameters)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RestService

public RestService(String server,
                   String clientId,
                   IMediaType defaultRequestMediaType,
                   String acceptedMediaType,
                   IRestResponseFactory factory,
                   IHttpClient client)

RestService

protected RestService(String server,
                      String clientId,
                      IMediaType defaultRequestMediaType,
                      String acceptedMediaType,
                      IRestResponseFactory factory,
                      IHttpClient client,
                      RestServiceProperties properties)

RestService

protected RestService(String server,
                      String clientId,
                      String protocolVersion,
                      IMediaType defaultRequestMediaType,
                      String acceptedMediaType,
                      IRestResponseFactory factory,
                      IHttpClient client,
                      RestServiceProperties properties)
Method Detail

request

public RestResponse request(Link link,
                            Parameter... parameters)
                     throws OpenShiftException
Specified by:
request in interface IRestService
Throws:
OpenShiftException

request

public RestResponse request(Link link,
                            int timeout,
                            Parameter... parameters)
                     throws OpenShiftException
Specified by:
request in interface IRestService
Throws:
OpenShiftException

request

public RestResponse request(Link link,
                            List<Parameter> urlParameters,
                            Parameter... parameters)
                     throws OpenShiftException
Specified by:
request in interface IRestService
Throws:
OpenShiftException

request

public RestResponse request(Link link,
                            int timeout,
                            IMediaType requestMediaType,
                            Parameter... parameters)
                     throws OpenShiftException
Description copied from interface: IRestService
Requests the given link sending the given parameters while encoding the parameters with the given media type and respecting the given timeout.

Specified by:
request in interface IRestService
Parameters:
link - the link to use
parameters - the parameters to send
Returns:
the rest response
Throws:
OpenShiftException
See Also:
Link, Parameter, IMediaType, IHttpClient.NO_TIMEOUT, IHttpClient.SYSPROP_DEFAULT_CONNECT_TIMEOUT, IHttpClient.SYSPROP_DEFAULT_READ_TIMEOUT, IHttpClient.SYSPROP_OPENSHIFT_CONNECT_TIMEOUT, IHttpClient.DEFAULT_CONNECT_TIMEOUT, IHttpClient.DEFAULT_READ_TIMEOUT

request

public RestResponse request(Link link,
                            int timeout,
                            List<Parameter> urlParameters,
                            Parameter... parameters)
                     throws OpenShiftException
Specified by:
request in interface IRestService
Throws:
OpenShiftException

request

public RestResponse request(Link link,
                            int timeout,
                            List<Parameter> urlParameters,
                            IMediaType requestMediaType,
                            Parameter... parameters)
                     throws OpenShiftException
Specified by:
request in interface IRestService
Throws:
OpenShiftException

getServiceUrl

public String getServiceUrl()
Description copied from interface: IRestService
Returns the url for the OpenShift service, the endpoint which this rest service class is talking to.

Specified by:
getServiceUrl in interface IRestService
Returns:
the url of the OpenShift service

getPlatformUrl

public String getPlatformUrl()
Description copied from interface: IRestService
Returns the OpenShift server.

Specified by:
getPlatformUrl in interface IRestService
Returns:

OpenShift Java Client 2.5.0.Final

Copyright © 2014 JBoss, a division of Red Hat, Inc.. All Rights Reserved.