Class AvaticaCommonsHttpClientSpnegoImpl

  • All Implemented Interfaces:
    AvaticaHttpClient

    public class AvaticaCommonsHttpClientSpnegoImpl
    extends java.lang.Object
    implements AvaticaHttpClient
    Implementation of an AvaticaHttpClient which uses SPNEGO.
    • 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 server
        credential - The GSS credentials
    • Method Detail

      • send

        public byte[] send​(byte[] request)
        Description copied from interface: AvaticaHttpClient
        Sends a serialized request to the Avatica server.
        Specified by:
        send in interface AvaticaHttpClient
        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