Interface DatabaseCollector

All Known Implementing Classes:
AbstractDatabaseCollector, HanaCollector, HsqlCollector, MySQLCollector, OracleCollector, SqlServerCollector

public interface DatabaseCollector
Database specific collecting strategy. Connection strings differ between database vendors, so a strategy like that needs to be implemented for every supported RDBMS and added to the DatabaseCollectorService bean definition.
  • Method Summary

    Modifier and Type
    Method
    Description
    Extracts host as a URI from the jdbc connection string.
    Extracts the database name from a jdbc connection string.
    boolean
    Checks whether this strategy should be applied to a given connection string.
  • Method Details

    • isApplicable

      boolean isApplicable(String url)
      Checks whether this strategy should be applied to a given connection string.
      Parameters:
      url - jdbc connection string
      Returns:
      true if this strategy should be used
    • getHost

      URI getHost(String url) throws URISyntaxException
      Extracts host as a URI from the jdbc connection string.
      Parameters:
      url - jdbc connection string
      Returns:
      host of the database as a URI
      Throws:
      URISyntaxException - in case of being unable to parse the connection string to a URI
    • getName

      String getName(String url)
      Extracts the database name from a jdbc connection string.
      Parameters:
      url - jdbc connection string
      Returns:
      name of the database