Class DefaultConnector

    • Constructor Detail

      • DefaultConnector

        public DefaultConnector()
        PUBLIC: Construct a Connector with default settings The database URL will still need to be set.
      • DefaultConnector

        public DefaultConnector​(String driverClassName,
                                String driverURLHeader,
                                String databaseURL)
        PUBLIC: Construct a Connector with the specified settings.
    • Method Detail

      • clone

        public Object clone()
        INTERNAL: Clone the connector.
        Specified by:
        clone in interface Connector
      • shouldUseDriverManager

        public boolean shouldUseDriverManager​(Properties properties,
                                              Session session)
        INTERNAL: Indicates whether DriverManager should be used.
        Returns:
        boolean
      • getConnectionString

        public String getConnectionString()
        PUBLIC: Return the JDBC connection string. This is a combination of the driver-specific URL header and the database URL.
      • getConnectionDetails

        public String getConnectionDetails()
        PUBLIC: Provide the details of my connection information. This is primarily for JMX runtime services.
        Specified by:
        getConnectionDetails in interface Connector
        Returns:
        java.lang.String
      • getDatabaseURL

        public String getDatabaseURL()
        PUBLIC: The database URL is the JDBC URL for the database server. The driver header is not be included in this URL (e.g. "dbase files"; not "jdbc:odbc:dbase files").
      • getDriverClassName

        public String getDriverClassName()
        PUBLIC: The driver class is the name of the Java class for the JDBC driver being used (e.g. "sun.jdbc.odbc.JdbcOdbcDriver").
      • getDriverURLHeader

        public String getDriverURLHeader()
        PUBLIC: The driver URL header is the string predetermined by the JDBC driver to be part of the URL connection string, (e.g. "jdbc:odbc:"). This is required to connect to the database.
      • setDatabaseURL

        public void setDatabaseURL​(String databaseURL)
        PUBLIC: The database URL is the JDBC URL for the database server. The driver header is not be included in this URL (e.g. "dbase files"; not "jdbc:odbc:dbase files").
      • setDriverClassName

        public void setDriverClassName​(String driverClassName)
        PUBLIC: The driver class is the name of the Java class for the JDBC driver being used (e.g. "sun.jdbc.odbc.JdbcOdbcDriver").
      • setDriverURLHeader

        public void setDriverURLHeader​(String driverURLHeader)
        PUBLIC: The driver URL header is the string predetermined by the JDBC driver to be part of the URL connection string, (e.g. "jdbc:odbc:"). This is required to connect to the database.
      • toString

        public String toString()
        PUBLIC: Print connection string.
        Overrides:
        toString in class Object
      • toString

        public void toString​(PrintWriter writer)
        INTERNAL: Print something useful on the log.
        Specified by:
        toString in interface Connector
      • clearDriverClassAndDriver

        public void clearDriverClassAndDriver()
        INTERNAL: Discard the cached driver class and driver.