Interface LoginConnectionConfiguration<T>

    • Field Detail

      • USERNAME

        static final Option<java.lang.String> USERNAME
        Option for the username property
      • PASSWORD

        static final Option<java.lang.String> PASSWORD
        Option for the password property
      • IS_TOKEN

        static final Option<java.lang.Boolean> IS_TOKEN
        Option for the token property
      • SERVER

        static final Option<java.lang.String> SERVER
        Option for the server URL property
      • CREDENTIALS_SUPPLIER

        static final Option<java.util.function.Supplier<ConnectionCredentials>> CREDENTIALS_SUPPLIER
        Option to set the Supplier which will be called at the time connection credentials are needed
      • KRB5_REVERSE_DNS

        static final Option<java.lang.Boolean> 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 Detail

      • connect

        T connect()
           throws StardogException
        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

        LoginConnectionConfiguration<T> credentials​(java.lang.String theUsername,
                                                    java.lang.String thePassword)
        Specify the username and password that should be used to authenticate to the database.
        Parameters:
        theUsername - the username
        thePassword - the password
        Returns:
        this configuration
      • credentials

        LoginConnectionConfiguration<T> credentials​(ConnectionCredentials theConnectionCredentials)
        Specify the credentials that should be used to authenticate to the database.
        Parameters:
        theConnectionCredentials - the credentials
        Returns:
        this configuration
      • credentialSupplier

        LoginConnectionConfiguration<T> credentialSupplier​(java.util.function.Supplier<ConnectionCredentials> theSupplier)
        Specify the supplier which will provide credentials at the time which they will be used.
        Parameters:
        theSupplier - the credential supplier
        Returns:
        this configuration
      • credentials

        LoginConnectionConfiguration<T> credentials​(java.lang.String theAPIToken)
        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

        LoginConnectionConfiguration<T> server​(java.lang.String theServerURL)
        Specify the URL of the database server.
        Parameters:
        theServerURL - the server url
        Returns:
        this configuration
      • set

        <S> LoginConnectionConfiguration<T> set​(Option<S> theOption,
                                                S theValue)
        Set an arbitrary option.
        Parameters:
        theOption - the option to set
        theValue - the value of the option
        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