Class AvaticaCommonsHttpClientSpnegoImpl
- java.lang.Object
-
- org.apache.calcite.avatica.remote.AvaticaCommonsHttpClientSpnegoImpl
-
- All Implemented Interfaces:
AvaticaHttpClient
public class AvaticaCommonsHttpClientSpnegoImpl extends java.lang.Object implements AvaticaHttpClient
Implementation of an AvaticaHttpClient which uses SPNEGO.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classAvaticaCommonsHttpClientSpnegoImpl.EmptyCredentialsA credentials implementation which returns null.
-
Field Summary
Fields Modifier and Type Field Description (package private) org.apache.http.impl.client.BasicAuthCacheauthCache(package private) org.apache.http.config.Lookup<org.apache.http.auth.AuthSchemeProvider>authRegistrystatic java.lang.StringCACHED_CONNECTIONS_MAX_DEFAULTstatic java.lang.StringCACHED_CONNECTIONS_MAX_KEYstatic java.lang.StringCACHED_CONNECTIONS_MAX_PER_ROUTE_DEFAULTstatic java.lang.StringCACHED_CONNECTIONS_MAX_PER_ROUTE_KEY(package private) org.apache.http.impl.client.CloseableHttpClientclient(package private) org.apache.http.impl.client.BasicCredentialsProvidercredentialsProvider(package private) org.apache.http.HttpHosthostprivate static org.slf4j.LoggerLOG(package private) org.apache.http.impl.conn.PoolingHttpClientConnectionManagerpoolprivate static booleanSTRIP_PORT_ON_SERVER_LOOKUP(package private) java.net.URLurlprivate static booleanUSE_CANONICAL_HOSTNAME
-
Constructor Summary
Constructors Constructor Description AvaticaCommonsHttpClientSpnegoImpl(java.net.URL url)Constructs an http client with the expectation that the user is already logged in with their Kerberos identity via JAAS.AvaticaCommonsHttpClientSpnegoImpl(java.net.URL url, org.ietf.jgss.GSSCredential credential)Constructs an HTTP client with user specified by the given credentials.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]send(byte[] request)Sends a serialized request to the Avatica server.private static java.net.URItoURI(java.net.URL url)
-
-
-
Field Detail
-
LOG
private static final org.slf4j.Logger LOG
-
CACHED_CONNECTIONS_MAX_KEY
public static final java.lang.String CACHED_CONNECTIONS_MAX_KEY
- See Also:
- Constant Field Values
-
CACHED_CONNECTIONS_MAX_DEFAULT
public static final java.lang.String CACHED_CONNECTIONS_MAX_DEFAULT
- See Also:
- Constant Field Values
-
CACHED_CONNECTIONS_MAX_PER_ROUTE_KEY
public static final java.lang.String CACHED_CONNECTIONS_MAX_PER_ROUTE_KEY
- See Also:
- Constant Field Values
-
CACHED_CONNECTIONS_MAX_PER_ROUTE_DEFAULT
public static final java.lang.String CACHED_CONNECTIONS_MAX_PER_ROUTE_DEFAULT
- See Also:
- Constant Field Values
-
USE_CANONICAL_HOSTNAME
private static final boolean USE_CANONICAL_HOSTNAME
- See Also:
- Constant Field Values
-
STRIP_PORT_ON_SERVER_LOOKUP
private static final boolean STRIP_PORT_ON_SERVER_LOOKUP
- See Also:
- Constant Field Values
-
url
final java.net.URL url
-
host
final org.apache.http.HttpHost host
-
pool
final org.apache.http.impl.conn.PoolingHttpClientConnectionManager pool
-
authRegistry
final org.apache.http.config.Lookup<org.apache.http.auth.AuthSchemeProvider> authRegistry
-
credentialsProvider
final org.apache.http.impl.client.BasicCredentialsProvider credentialsProvider
-
authCache
final org.apache.http.impl.client.BasicAuthCache authCache
-
client
final org.apache.http.impl.client.CloseableHttpClient client
-
-
Constructor Detail
-
AvaticaCommonsHttpClientSpnegoImpl
public AvaticaCommonsHttpClientSpnegoImpl(java.net.URL url)
Constructs an http client with the expectation that the user is already logged in with their Kerberos identity via JAAS.- Parameters:
url- The URL for the Avatica server
-
AvaticaCommonsHttpClientSpnegoImpl
public AvaticaCommonsHttpClientSpnegoImpl(java.net.URL url, org.ietf.jgss.GSSCredential credential)Constructs an HTTP client with user specified by the given credentials.- Parameters:
url- The URL for the Avatica servercredential- The GSS credentials
-
-
Method Detail
-
send
public byte[] send(byte[] request)
Description copied from interface:AvaticaHttpClientSends a serialized request to the Avatica server.- Specified by:
sendin interfaceAvaticaHttpClient- Parameters:
request- The serialized request.- Returns:
- The serialized response.
-
toURI
private static java.net.URI toURI(java.net.URL url) throws java.lang.RuntimeException- Throws:
java.lang.RuntimeException
-
-