Package com.complexible.stardog.api
Interface LoginConnectionConfiguration<T>
- All Known Implementing Classes:
AbstractConnectionConfiguration,AdminConnectionConfiguration,ConnectionConfiguration
public interface LoginConnectionConfiguration<T>
Interface representing connection options such as authentication credentials and the server to connect to.
- Since:
- 0.1
- Version:
- 3.0
- Author:
- Hector Perez-Urbina, Michael Grove
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringSpecial username that will be used when anAPI tokenis usedstatic final Option<ConnectionCredentials> Option for the credentials associated with a connectionstatic final Option<Supplier<ConnectionCredentials>> Option to set the Supplier which will be called at the time connection credentials are neededOption for the token propertySet a specific credential object instead of an implied on with username/password.Option for the password propertyOption for the server URL propertyOption for the username property -
Method Summary
Modifier and TypeMethodDescriptionconnect()Open the connection to the database as described by this configuration.credentials(ConnectionCredentials theConnectionCredentials) Specify the credentials that should be used to authenticate to the database.credentials(String theAPIToken) Specify the API token that should be used to authenticate to the database.credentials(String theUsername, String thePassword) Specify the username and password that should be used to authenticate to the database.credentialSupplier(Supplier<ConnectionCredentials> theSupplier) Specify the supplier which will provide credentials at the time which they will be used.Return the current options of this configuration.Specify the URL of the database server.Set an arbitrary option.Set all the specified options
-
Field Details
-
BEARER
Special username that will be used when anAPI tokenis used- See Also:
-
USERNAME
Option for the username property -
PASSWORD
Option for the password property -
IS_TOKEN
Option for the token property -
SERVER
Option for the server URL property -
CREDENTIALS
Option for the credentials associated with a connection -
CREDENTIALS_SUPPLIER
Option to set the Supplier which will be called at the time connection credentials are needed -
KRB5_REVERSE_DNS
Set a specific credential object instead of an implied on with username/password. This option is used to setup Kerberos authentication.
-
-
Method Details
-
connect
Open the connection to the database as described by this configuration.- Returns:
- the connection
- Throws:
StardogException- if there was an error while opening the connection.
-
credentials
Specify the username and password that should be used to authenticate to the database.- Parameters:
theUsername- the usernamethePassword- the password- Returns:
- this configuration
-
credentials
Specify the credentials that should be used to authenticate to the database.- Parameters:
theConnectionCredentials- the credentials- Returns:
- this configuration
-
credentialSupplier
Specify the supplier which will provide credentials at the time which they will be used.- Parameters:
theSupplier- the credential supplier- Returns:
- this configuration
-
credentials
Specify the API token that should be used to authenticate to the database. No other credentials info (username or password) is needed if an API token is provided.- Returns:
- this configuration
-
server
Specify the URL of the database server.- Parameters:
theServerURL- the server url- Returns:
- this configuration
-
set
Set an arbitrary option.- Parameters:
theOption- the option to settheValue- the value of the option- Returns:
- this configuration
-
setAll
Set all the specified options- Parameters:
theOptions- the options to set- Returns:
- this configuration
-
getOptions
Options getOptions()Return the current options of this configuration. Returns a copy of the options, changes to the resulting object will have NO effect on this configuration.- Returns:
- the options
-