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:
  • 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.