Package com.complexible.stardog.api

# Class DriverManager

java.lang.Object
com.complexible.stardog.api.DriverManager

public final class DriverManager extends Object

Service for obtaining instances of `Drivers` and `Connection` instances.

Since:
  0.3
Version:
  4.0
Author:
  Michael Grove, Fernando Hernandez
See Also:
  - `Driver`
  - `Connection`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Connection`
  `getConnection(String theURL, Options theOptions)`
  Obtain a connection to the database at the specified URL
  `Driver`
  `getDriver(String theURL)`
  Return a Driver suitable for opening the provided database URL
  `static DriverManager`
  `getInstance()`
  `void`
  `register(Driver theDriver)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### getInstance

    public static DriverManager getInstance()

  - ### register

    public void register(Driver theDriver)

  - ### getDriver

    public Driver getDriver(String theURL) throws StardogException
    Return a Driver suitable for opening the provided database URL
    Parameters:
      `theURL` - the database URL
    Returns:
      a Driver which can open connections to the database at the provided URL
    Throws:
      `StardogException` - if no driver is found

  - ### getConnection

    public Connection getConnection(String theURL, Options theOptions) throws StardogException
    Obtain a connection to the database at the specified URL
    Parameters:
      `theURL` - the database URL WITHOUT any properties
      `theOptions` - the connection options
    Returns:
      the connection or null if no suitable driver is found.
    Throws:
      `StardogException` - if there is an error while obtaining the connection.