Package com.complexible.stardog.api
Class AbstractConnectionConfiguration<T>
java.lang.Object
com.complexible.stardog.api.AbstractConnectionConfiguration<T>
- All Implemented Interfaces:
LoginConnectionConfiguration<T>
- Direct Known Subclasses:
AdminConnectionConfiguration,ConnectionConfiguration
public abstract class AbstractConnectionConfiguration<T>
extends Object
implements LoginConnectionConfiguration<T>
- Since:
- 2.0
- Version:
- 3.0
- Author:
- Hector Perez-Urbina, Michael Grove
-
Field Summary
FieldsModifier and TypeFieldDescriptionThis is used to describe Stardog's communicate to server to which this connection will connect information about how this connection is being used The main use case is for a replicated cluster command to be able to tell the remote node that this connection is in fact replicated and not a command coming from an end user.static final com.complexible.stardog.api.OptionParserprotected final OptionsFields inherited from interface com.complexible.stardog.api.LoginConnectionConfiguration
BEARER, CREDENTIALS, CREDENTIALS_SUPPLIER, IS_TOKEN, KRB5_REVERSE_DNS, PASSWORD, SERVER, USERNAME -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedAbstractConnectionConfiguration(Options theOptions) -
Method Summary
Modifier and TypeMethodDescriptioncredentials(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.Run commands passed to this connection as the given userSpecify the URL of the database server.Set an arbitrary option.Set all the specified optionsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.complexible.stardog.api.LoginConnectionConfiguration
connect
-
Field Details
-
mOptions
-
mOptionParser
public static final com.complexible.stardog.api.OptionParser mOptionParser -
RUN_AS_USER
-
CONNECTION_TYPE
This is used to describe Stardog's communicate to server to which this connection will connect information about how this connection is being used The main use case is for a replicated cluster command to be able to tell the remote node that this connection is in fact replicated and not a command coming from an end user.
-
-
Constructor Details
-
AbstractConnectionConfiguration
protected AbstractConnectionConfiguration() -
AbstractConnectionConfiguration
-
-
Method Details
-
set
Set an arbitrary option.- Specified by:
setin interfaceLoginConnectionConfiguration<T>- Parameters:
theOption- the option to settheValue- the value of the option- Returns:
- this configuration
-
credentials
Specify the username and password that should be used to authenticate to the database.- Specified by:
credentialsin interfaceLoginConnectionConfiguration<T>- Parameters:
theUsername- the usernamethePassword- the password- Returns:
- this configuration
-
credentials
public AbstractConnectionConfiguration<T> credentials(ConnectionCredentials theConnectionCredentials) Specify the credentials that should be used to authenticate to the database.- Specified by:
credentialsin interfaceLoginConnectionConfiguration<T>- Parameters:
theConnectionCredentials- the credentials- Returns:
- this configuration
-
credentialSupplier
public LoginConnectionConfiguration<T> credentialSupplier(Supplier<ConnectionCredentials> theSupplier) Description copied from interface:LoginConnectionConfigurationSpecify the supplier which will provide credentials at the time which they will be used.- Specified by:
credentialSupplierin interfaceLoginConnectionConfiguration<T>- Parameters:
theSupplier- the credential supplier- 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<T>- Returns:
- this configuration
-
server
Specify the URL of the database server.- Specified by:
serverin interfaceLoginConnectionConfiguration<T>- Parameters:
theServerURL- the server url- Returns:
- this configuration
-
runningAs
Run commands passed to this connection as the given user- Parameters:
theUsername- the username- Returns:
- this object
-
setAll
Set all the specified options- Specified by:
setAllin interfaceLoginConnectionConfiguration<T>- Parameters:
theOptions- the options to set- Returns:
- this configuration
-
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.- Specified by:
getOptionsin interfaceLoginConnectionConfiguration<T>- Returns:
- the options
-