public class HttpUrlConnectionAuthClient extends AbstractHttpAuthClient<java.net.HttpURLConnection> implements HttpAuthClient<java.net.HttpURLConnection>
| Constructor and Description |
|---|
HttpUrlConnectionAuthClient(ClientConfiguration configuration)
Creates
HttpUrlConnectionAuthClient object from the specified
client configuration object. |
| Modifier and Type | Method and Description |
|---|---|
HttpResponse<java.net.HttpURLConnection> |
execute(Request request,
ExecutionContext context)
Executes the request and return the response.
|
<T> T |
execute(Request request,
HttpResponseHandler<ApiServiceResponse<T>> responseHandler,
HttpResponseHandler<AuthServiceException> errorResponseHandler,
ExecutionContext context)
Executes the request and return the response.
|
protected void |
finalize() |
static boolean |
isRequestEntityTooLargeException(AuthServiceException ase) |
static boolean |
isThrottlingException(AuthServiceException ase) |
void |
shutdown()
Shuts down and releases the connection to server.
|
getConfigurationpublic HttpUrlConnectionAuthClient(ClientConfiguration configuration)
HttpUrlConnectionAuthClient object from the specified
client configuration object.configuration - the specified client configuration object.public HttpResponse<java.net.HttpURLConnection> execute(Request request, ExecutionContext context) throws AuthClientException
HttpAuthClientexecute in interface HttpAuthClient<java.net.HttpURLConnection>request - the request to send to the server.context - Additional information about the context of this web
service call.AuthClientException - if an error occurs during executing the request.AuthServiceException - if an error occurs during executing the request.public <T> T execute(Request request, HttpResponseHandler<ApiServiceResponse<T>> responseHandler, HttpResponseHandler<AuthServiceException> errorResponseHandler, ExecutionContext context) throws AuthClientException
HttpAuthClientexecute in interface HttpAuthClient<java.net.HttpURLConnection>request - the request to send to server.responseHandler - the response handler to accept a successful response
from the remote server.errorResponseHandler - A response handler to accept an unsuccessful
response from the remote server.context - Additional information about the context of this web service
call.AuthClientException - if an error occurs during executing the request.AuthServiceException - if an error occurs during executing the request.public static boolean isThrottlingException(AuthServiceException ase)
public static boolean isRequestEntityTooLargeException(AuthServiceException ase)
public void shutdown()
HttpAuthClientshutdown in interface HttpAuthClient<java.net.HttpURLConnection>protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable