org.apache.calcite.avatica.remote

## Class AvaticaCommonsHttpClientSpnegoImpl

- java.lang.Object
- - org.apache.calcite.avatica.remote.AvaticaCommonsHttpClientImpl
  - - org.apache.calcite.avatica.remote.AvaticaCommonsHttpClientSpnegoImpl

All Implemented Interfaces:
  AvaticaHttpClient, HostnameVerificationConfigurable, KeyStoreConfigurable, TrustStoreConfigurable, UsernamePasswordAuthenticateable

    public class AvaticaCommonsHttpClientSpnegoImpl
    extends AvaticaCommonsHttpClientImpl

Implementation of an AvaticaHttpClient which uses SPNEGO.

(At this point it could probably be just merged back into `AvaticaCommonsHttpClientImpl`.)

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.apache.calcite.avatica.remote.HostnameVerificationConfigurable

`HostnameVerificationConfigurable.HostnameVerification`

### Field Summary

Fields
`static String` `CACHED_CONNECTIONS_MAX_KEY`
`static String` `CACHED_CONNECTIONS_MAX_PER_ROUTE_KEY`

### Fields inherited from class org.apache.calcite.avatica.remote.AvaticaCommonsHttpClientImpl

`authCache, authRegistry, client, credentials, credentialsProvider, host, hostnameVerification, keyPassword, keystore, keystorePassword, pool, socketFactoryRegistry, truststore, truststorePassword, uri, userToken`

### Constructor Summary

Constructors
Constructor and Description
`AvaticaCommonsHttpClientSpnegoImpl(URL url)` Constructs an http client with the expectation that the user is already logged in with their Kerberos identity via JAAS.
`AvaticaCommonsHttpClientSpnegoImpl(URL url, GSSCredential credential)` Constructs an HTTP client with user specified by the given credentials.

### Method Summary

All Methods Instance Methods Concrete Methods
`protected void` `configureConnectionPool(org.apache.http.config.Registry<org.apache.http.conn.socket.ConnectionSocketFactory> registry)`
`byte[]` `send(byte[] request)` Sends a serialized request to the Avatica server.
`void` `setGSSCredential(GSSCredential credential)`

### Methods inherited from class org.apache.calcite.avatica.remote.AvaticaCommonsHttpClientImpl

`configureHttpRegistry, configureHttpsRegistry, configureSocketFactories, initializeClient, loadKeyStore, loadTrustStore, setHostnameVerification, setKeyStore, setTrustStore, setUsernamePassword`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### CACHED_CONNECTIONS_MAX_KEY

    public static final String CACHED_CONNECTIONS_MAX_KEY

See Also:
  Constant Field Values

#### CACHED_CONNECTIONS_MAX_PER_ROUTE_KEY

    public static final String CACHED_CONNECTIONS_MAX_PER_ROUTE_KEY

See Also:
  Constant Field Values

### Constructor Detail

#### AvaticaCommonsHttpClientSpnegoImpl

    public AvaticaCommonsHttpClientSpnegoImpl(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(URL url,
                                              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

#### configureConnectionPool

    protected void configureConnectionPool(org.apache.http.config.Registry<org.apache.http.conn.socket.ConnectionSocketFactory> registry)

Overrides:
  `configureConnectionPool` in class `AvaticaCommonsHttpClientImpl`

#### setGSSCredential

    public void setGSSCredential(GSSCredential credential)

#### 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`
Overrides:
  `send` in class `AvaticaCommonsHttpClientImpl`
Parameters:
  `request` - The serialized request.
Returns:
  The serialized response.