public class HttpClientRequestExecutor extends Object implements RequestExecutor
RequestExecutor implementation that uses the
Apache HttpClient implementation to
execute http requests.| Constructor and Description |
|---|
HttpClientRequestExecutor(ClientCredentials clientCredentials,
Proxy proxy,
AuthenticationScheme authenticationScheme,
RequestAuthenticatorFactory requestAuthenticatorFactory,
Integer connectionTimeout)
Creates a new
HttpClientRequestExecutor using the specified ClientCredentials 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.client.HttpClient httpClient) |
void |
setNumRetries(int numRetries) |
protected byte[] |
toBytes(org.apache.http.HttpEntity entity) |
protected Response |
toSdkResponse(org.apache.http.HttpResponse httpResponse) |
public HttpClientRequestExecutor(ClientCredentials clientCredentials, Proxy proxy, AuthenticationScheme authenticationScheme, RequestAuthenticatorFactory requestAuthenticatorFactory, Integer connectionTimeout)
HttpClientRequestExecutor using the specified ClientCredentials and optional Proxy
configuration.clientCredentials - the Okta account API Key that will be used to authenticate the client with Okta's API severproxy - the HTTP proxy to be used when communicating with the Okta API server (can be null)authenticationScheme - the HTTP authentication scheme to be used when communicating with the Okta API server.
If null, then SSWS 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.client.HttpClient httpClient)
public Response executeRequest(Request request) throws RestException
executeRequest in interface RequestExecutorRestExceptionprotected byte[] toBytes(org.apache.http.HttpEntity entity)
throws IOException
IOExceptionprotected Response toSdkResponse(org.apache.http.HttpResponse httpResponse) throws IOException
IOExceptionCopyright © 2017 Okta. All rights reserved.