public interface LoginConnectionConfiguration<T>
Interface representing connection options such as authentication credentials and the server to connect to.
Modifier and Type | Field and Description |
---|---|
static Option<ConnectionCredentials> |
CREDENTIALS
Option for the credentials associated with a connection
|
static Option<Supplier<ConnectionCredentials>> |
CREDENTIALS_SUPPLIER
Option to set the Supplier which will be called at the time connection credentials are needed
|
static Option<Boolean> |
KRB5_REVERSE_DNS
Set a specific credential object instead of an implied on with username/password.
|
static Option<String> |
PASSWORD
Option for the password property
|
static Option<String> |
SERVER
Option for the server URL property
|
static Option<String> |
USERNAME
Option for the username property
|
Modifier and Type | Method and Description |
---|---|
T |
connect()
Open the connection to the database as described by this configuration.
|
LoginConnectionConfiguration<T> |
credentials(ConnectionCredentials theConnectionCredentials)
Specify the credentials that should be used to authenticate to the database.
|
LoginConnectionConfiguration<T> |
credentials(String theUsername,
String thePassword)
Specify the username and password that should be used to authenticate to the database.
|
LoginConnectionConfiguration<T> |
credentialSupplier(Supplier<ConnectionCredentials> theSupplier)
Specify the supplier which will provide credentials at the time which they will be used.
|
Options |
getOptions()
Return the current options of this configuration.
|
LoginConnectionConfiguration<T> |
server(String theServerURL)
Specify the URL of the database server.
|
<S> LoginConnectionConfiguration<T> |
set(Option<S> theOption,
S theValue)
Set an arbitrary option.
|
LoginConnectionConfiguration<T> |
setAll(Options theOptions)
Set all the specified options
|
static final Option<ConnectionCredentials> CREDENTIALS
static final Option<Supplier<ConnectionCredentials>> CREDENTIALS_SUPPLIER
T connect() throws StardogException
StardogException
- if there was an error while opening the connection.LoginConnectionConfiguration<T> credentials(String theUsername, String thePassword)
theUsername
- the usernamethePassword
- the passwordLoginConnectionConfiguration<T> credentials(ConnectionCredentials theConnectionCredentials)
theConnectionCredentials
- the credentialsLoginConnectionConfiguration<T> credentialSupplier(Supplier<ConnectionCredentials> theSupplier)
theSupplier
- the credential supplierLoginConnectionConfiguration<T> server(String theServerURL)
theServerURL
- the server url<S> LoginConnectionConfiguration<T> set(Option<S> theOption, S theValue)
theOption
- the option to settheValue
- the value of the optionLoginConnectionConfiguration<T> setAll(Options theOptions)
theOptions
- the options to setOptions getOptions()
Copyright © 2010-2016 Stardog Union. All Rights Reserved.