public abstract static class GravitinoClientBase.Builder<T>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected com.datastrato.gravitino.client.AuthDataProvider |
authDataProvider
The authentication provider.
|
protected boolean |
checkVersion
The check version flag.
|
protected java.util.Map<java.lang.String,java.lang.String> |
headers
The request base header for the Gravitino API.
|
protected java.lang.String |
uri
The base URI for the Gravitino API.
|
Modifier | Constructor and Description |
---|---|
protected |
Builder(java.lang.String uri)
The constructor for the Builder class.
|
Modifier and Type | Method and Description |
---|---|
abstract T |
build()
Builds a new instance.
|
GravitinoClientBase.Builder<T> |
withHeaders(java.util.Map<java.lang.String,java.lang.String> headers)
Set base header for Gravitino Client.
|
GravitinoClientBase.Builder<T> |
withKerberosAuth(KerberosTokenProvider dataProvider)
Sets KerberosTokenProvider for the Gravitino.
|
GravitinoClientBase.Builder<T> |
withOAuth(OAuth2TokenProvider dataProvider)
Sets OAuth2TokenProvider for Gravitino.
|
GravitinoClientBase.Builder<T> |
withSimpleAuth()
Sets the simple mode authentication for Gravitino
|
GravitinoClientBase.Builder<T> |
withVersionCheckDisabled()
Optional, set a flag to verify the client is supported to connector the server
|
protected java.lang.String uri
protected com.datastrato.gravitino.client.AuthDataProvider authDataProvider
protected boolean checkVersion
protected java.util.Map<java.lang.String,java.lang.String> headers
protected Builder(java.lang.String uri)
uri
- The base URI for the Gravitino API.public GravitinoClientBase.Builder<T> withSimpleAuth()
public GravitinoClientBase.Builder<T> withVersionCheckDisabled()
public GravitinoClientBase.Builder<T> withOAuth(OAuth2TokenProvider dataProvider)
dataProvider
- The OAuth2TokenProvider used as the provider of authentication data for
Gravitino Client.public GravitinoClientBase.Builder<T> withKerberosAuth(KerberosTokenProvider dataProvider)
dataProvider
- The KerberosTokenProvider used as the provider of authentication data for
Gravitino Client.public GravitinoClientBase.Builder<T> withHeaders(java.util.Map<java.lang.String,java.lang.String> headers)
headers
- the base header.public abstract T build()
java.lang.IllegalArgumentException
- If the base URI is null or empty.java.lang.UnsupportedOperationException
- If subclass has not implemented.