Class AdminConnectionConfiguration
java.lang.Object
com.complexible.stardog.api.AbstractConnectionConfiguration<AdminConnection>
com.complexible.stardog.api.admin.AdminConnectionConfiguration
- All Implemented Interfaces:
LoginConnectionConfiguration<AdminConnection>
public final class AdminConnectionConfiguration
extends AbstractConnectionConfiguration<AdminConnection>
- Version:
- 2.0
- Author:
- Hector Perez-Urbina
-
Field Summary
Fields inherited from class com.complexible.stardog.api.AbstractConnectionConfiguration
CONNECTION_TYPE, mOptionParser, mOptions, RUN_AS_USERFields inherited from interface com.complexible.stardog.api.LoginConnectionConfiguration
BEARER, CREDENTIALS, CREDENTIALS_SUPPLIER, IS_TOKEN, KRB5_REVERSE_DNS, PASSWORD, SERVER, USERNAME -
Constructor Summary
Constructors -
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.Run commands passed to this connection as the given userSpecify the URL of the database server.static AdminConnectionConfigurationMethods inherited from class com.complexible.stardog.api.AbstractConnectionConfiguration
getOptions, set, setAll
-
Constructor Details
-
AdminConnectionConfiguration
public AdminConnectionConfiguration()
-
-
Method Details
-
server
Specify the URL of the database server.- Specified by:
serverin interfaceLoginConnectionConfiguration<AdminConnection>- Overrides:
serverin classAbstractConnectionConfiguration<AdminConnection>- Parameters:
theServerURL- the server url- Returns:
- this configuration
-
credentials
Specify the username and password that should be used to authenticate to the database.- Specified by:
credentialsin interfaceLoginConnectionConfiguration<AdminConnection>- Overrides:
credentialsin classAbstractConnectionConfiguration<AdminConnection>- Parameters:
theUsername- the usernamethePassword- the password- Returns:
- this configuration
-
credentials
Specify the credentials that should be used to authenticate to the database.- Specified by:
credentialsin interfaceLoginConnectionConfiguration<AdminConnection>- Overrides:
credentialsin classAbstractConnectionConfiguration<AdminConnection>- Parameters:
theConnectionCredentials- the credentials- Returns:
- this configuration
-
credentials
Description copied from interface:LoginConnectionConfigurationSpecify 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.- Specified by:
credentialsin interfaceLoginConnectionConfiguration<AdminConnection>- Overrides:
credentialsin classAbstractConnectionConfiguration<AdminConnection>- Returns:
- this configuration
-
credentialSupplier
Description copied from interface:LoginConnectionConfigurationSpecify the supplier which will provide credentials at the time which they will be used.- Specified by:
credentialSupplierin interfaceLoginConnectionConfiguration<AdminConnection>- Overrides:
credentialSupplierin classAbstractConnectionConfiguration<AdminConnection>- Parameters:
theSupplier- the credential supplier- Returns:
- this configuration
-
runningAs
Run commands passed to this connection as the given user- Overrides:
runningAsin classAbstractConnectionConfiguration<AdminConnection>- Parameters:
theUserName- the username- Returns:
- this object
-
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.
-
toServer
-