public class AvaticaCommonsHttpClientImpl extends Object implements AvaticaHttpClient, HttpClientPoolConfigurable, UsernamePasswordAuthenticateable, GSSAuthenticateable
Modifier and Type | Field and Description |
---|---|
protected org.apache.hc.client5.http.impl.auth.BasicAuthCache |
authCache |
protected org.apache.hc.core5.http.config.Lookup<org.apache.hc.client5.http.auth.AuthSchemeFactory> |
authRegistry |
protected org.apache.hc.client5.http.impl.classic.CloseableHttpClient |
client |
protected org.apache.hc.client5.http.auth.UsernamePasswordCredentials |
credentials |
protected org.apache.hc.client5.http.auth.CredentialsProvider |
credentialsProvider |
protected org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager |
pool |
protected org.apache.hc.core5.http.config.Registry<org.apache.hc.client5.http.socket.ConnectionSocketFactory> |
socketFactoryRegistry |
protected URI |
uri |
protected Object |
userToken |
Constructor and Description |
---|
AvaticaCommonsHttpClientImpl(URL url) |
Modifier and Type | Method and Description |
---|---|
protected void |
initializeClient(org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager pool,
ConnectionConfig config) |
byte[] |
send(byte[] request)
Sends a serialized request to the Avatica server.
|
void |
setGSSCredential(GSSCredential credential)
Sets the GSS Credential
If credential is null, then the current subject will be used
|
void |
setHttpClientPool(org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager pool,
ConnectionConfig config)
Sets a PoolingHttpClientConnectionManager containing the collection of SSL/TLS server
keys and truststores to use for HTTPS calls.
|
void |
setUsernamePassword(AuthenticationType authType,
String username,
String password)
Sets the username, password and method to be used for authentication.
|
protected final URI uri
protected org.apache.hc.client5.http.impl.auth.BasicAuthCache authCache
protected org.apache.hc.client5.http.impl.classic.CloseableHttpClient client
protected org.apache.hc.core5.http.config.Registry<org.apache.hc.client5.http.socket.ConnectionSocketFactory> socketFactoryRegistry
protected org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager pool
protected org.apache.hc.client5.http.auth.UsernamePasswordCredentials credentials
protected org.apache.hc.client5.http.auth.CredentialsProvider credentialsProvider
protected org.apache.hc.core5.http.config.Lookup<org.apache.hc.client5.http.auth.AuthSchemeFactory> authRegistry
protected Object userToken
public AvaticaCommonsHttpClientImpl(URL url)
protected void initializeClient(org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager pool, ConnectionConfig config)
public byte[] send(byte[] request)
AvaticaHttpClient
send
in interface AvaticaHttpClient
request
- The serialized request.public void setUsernamePassword(AuthenticationType authType, String username, String password)
UsernamePasswordAuthenticateable
setUsernamePassword
in interface UsernamePasswordAuthenticateable
authType
- Type of authenticationusername
- Usernamepassword
- Passwordpublic void setGSSCredential(GSSCredential credential)
GSSAuthenticateable
setGSSCredential
in interface GSSAuthenticateable
credential
- GSS Credentialspublic void setHttpClientPool(org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager pool, ConnectionConfig config)
HttpClientPoolConfigurable
setHttpClientPool
in interface HttpClientPoolConfigurable
pool
- The http connection poolconfig
- The connection configCopyright © 2012-2023 Apache Software Foundation. All Rights Reserved.