Search in sources :

Example 1 with RestClientItf

use of com.emc.storageos.services.restutil.RestClientItf in project coprhd-controller by CoprHD.

the class XtremIOClientFactory method getRESTClient.

public RestClientItf getRESTClient(URI endpoint, String username, String password, String version, boolean authFilter) {
    // removed caching RestClient session as it is not actually a session, just a java RestClient object
    // RestClientItf clientApi = _clientMap.get(endpoint.toString() + ":" + username + ":" + password + ":" + model);
    Client jerseyClient = new ApacheHttpClient(_clientHandler);
    if (authFilter) {
        jerseyClient.addFilter(new HTTPBasicAuthFilter(username, password));
    }
    RestClientItf clientApi = createNewRestClient(endpoint, username, password, version, jerseyClient);
    return clientApi;
}
Also used : ApacheHttpClient(com.sun.jersey.client.apache.ApacheHttpClient) RestClientItf(com.emc.storageos.services.restutil.RestClientItf) ApacheHttpClient(com.sun.jersey.client.apache.ApacheHttpClient) Client(com.sun.jersey.api.client.Client) HTTPBasicAuthFilter(com.sun.jersey.api.client.filter.HTTPBasicAuthFilter)

Aggregations

RestClientItf (com.emc.storageos.services.restutil.RestClientItf)1 Client (com.sun.jersey.api.client.Client)1 HTTPBasicAuthFilter (com.sun.jersey.api.client.filter.HTTPBasicAuthFilter)1 ApacheHttpClient (com.sun.jersey.client.apache.ApacheHttpClient)1