public class AvaticaCommonsHttpClientImpl extends Object implements AvaticaHttpClient, UsernamePasswordAuthenticateable
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.http.impl.client.BasicAuthCache |
authCache |
protected org.apache.http.config.Lookup<org.apache.http.auth.AuthSchemeProvider> |
authRegistry |
protected org.apache.http.impl.client.CloseableHttpClient |
client |
protected org.apache.http.auth.UsernamePasswordCredentials |
credentials |
protected org.apache.http.client.CredentialsProvider |
credentialsProvider |
protected org.apache.http.HttpHost |
host |
protected org.apache.http.protocol.HttpRequestExecutor |
httpExecutor |
protected org.apache.http.protocol.HttpProcessor |
httpProcessor |
private static org.slf4j.Logger |
LOG |
private static String |
MAX_POOLED_CONNECTION_PER_ROUTE_DEFAULT |
private static String |
MAX_POOLED_CONNECTION_PER_ROUTE_KEY |
private static String |
MAX_POOLED_CONNECTIONS_DEFAULT |
private static String |
MAX_POOLED_CONNECTIONS_KEY |
(package private) org.apache.http.impl.conn.PoolingHttpClientConnectionManager |
pool |
protected URI |
uri |
| Constructor and Description |
|---|
AvaticaCommonsHttpClientImpl(URL url) |
| Modifier and Type | Method and Description |
|---|---|
(package private) org.apache.http.client.methods.CloseableHttpResponse |
execute(org.apache.http.client.methods.HttpPost post,
org.apache.http.client.protocol.HttpClientContext context) |
byte[] |
send(byte[] request)
Sends a serialized request to the Avatica server.
|
void |
setUsernamePassword(AuthenticationType authType,
String username,
String password)
Sets the username, password and method to be used for authentication.
|
private static URI |
toURI(URL url) |
private static final org.slf4j.Logger LOG
private static final String MAX_POOLED_CONNECTION_PER_ROUTE_KEY
private static final String MAX_POOLED_CONNECTION_PER_ROUTE_DEFAULT
private static final String MAX_POOLED_CONNECTIONS_KEY
private static final String MAX_POOLED_CONNECTIONS_DEFAULT
protected final org.apache.http.HttpHost host
protected final URI uri
protected final org.apache.http.protocol.HttpProcessor httpProcessor
protected final org.apache.http.protocol.HttpRequestExecutor httpExecutor
protected final org.apache.http.impl.client.BasicAuthCache authCache
protected final org.apache.http.impl.client.CloseableHttpClient client
final org.apache.http.impl.conn.PoolingHttpClientConnectionManager pool
protected org.apache.http.auth.UsernamePasswordCredentials credentials
protected org.apache.http.client.CredentialsProvider credentialsProvider
protected org.apache.http.config.Lookup<org.apache.http.auth.AuthSchemeProvider> authRegistry
public AvaticaCommonsHttpClientImpl(URL url)
public byte[] send(byte[] request)
AvaticaHttpClientsend in interface AvaticaHttpClientrequest - The serialized request.org.apache.http.client.methods.CloseableHttpResponse execute(org.apache.http.client.methods.HttpPost post,
org.apache.http.client.protocol.HttpClientContext context)
throws IOException,
org.apache.http.client.ClientProtocolException
IOExceptionorg.apache.http.client.ClientProtocolExceptionpublic void setUsernamePassword(AuthenticationType authType, String username, String password)
UsernamePasswordAuthenticateablesetUsernamePassword in interface UsernamePasswordAuthenticateableauthType - Type of authenticationusername - Usernamepassword - Passwordprivate static URI toURI(URL url) throws RuntimeException
RuntimeExceptionCopyright © 2012–2016 The Apache Software Foundation. All rights reserved.