public class HttpClientRequestExecutor extends Object implements RequestExecutor
RequestExecutor implementation that uses the
Apache HttpClient implementation to
execute http requests.| Constructor and Description |
|---|
HttpClientRequestExecutor(com.stormpath.sdk.client.ApiKey apiKey,
com.stormpath.sdk.client.Proxy proxy,
com.stormpath.sdk.client.AuthenticationScheme authenticationScheme)
Creates a new
HttpClientRequestExecutor using the specified ApiKey and optional Proxy
configuration. |
| Modifier and Type | Method and Description |
|---|---|
Response |
executeRequest(Request request) |
BackoffStrategy |
getBackoffStrategy() |
int |
getNumRetries() |
void |
setBackoffStrategy(BackoffStrategy backoffStrategy) |
void |
setHttpClient(org.apache.http.impl.client.DefaultHttpClient httpClient) |
void |
setNumRetries(int numRetries) |
protected Response |
toSdkResponse(org.apache.http.HttpResponse httpResponse) |
public HttpClientRequestExecutor(com.stormpath.sdk.client.ApiKey apiKey,
com.stormpath.sdk.client.Proxy proxy,
com.stormpath.sdk.client.AuthenticationScheme authenticationScheme)
HttpClientRequestExecutor using the specified ApiKey and optional Proxy
configuration.apiKey - the Stormpath account API Key that will be used to authenticate the client with Stormpath's API severproxy - the HTTP proxy to be used when communicating with the Stormpath API server (can be null)authenticationScheme - the HTTP authentication scheme to be used when communicating with the Stormpath API server.
If null, then Sauthc1 will be used.public int getNumRetries()
public void setNumRetries(int numRetries)
public BackoffStrategy getBackoffStrategy()
public void setBackoffStrategy(BackoffStrategy backoffStrategy)
public void setHttpClient(org.apache.http.impl.client.DefaultHttpClient httpClient)
public Response executeRequest(Request request) throws RestException
executeRequest in interface RequestExecutorRestExceptionprotected Response toSdkResponse(org.apache.http.HttpResponse httpResponse) throws IOException
IOExceptionCopyright © 2012–2014. All rights reserved.