Interface DatabaseCollector
-
- All Known Implementing Classes:
AbstractDatabaseCollector,HanaCollector,HsqlCollector,MySQLCollector,OracleCollector,SqlServerCollector
public interface DatabaseCollectorDatabase 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.net.URIgetHost(java.lang.String url)Extracts host as a URI from the jdbc connection string.java.lang.StringgetName(java.lang.String url)Extracts the database name from a jdbc connection string.booleanisApplicable(java.lang.String url)Checks whether this strategy should be applied to a given connection string.
-
-
-
Method Detail
-
isApplicable
boolean isApplicable(java.lang.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
java.net.URI getHost(java.lang.String url) throws java.net.URISyntaxExceptionExtracts host as a URI from the jdbc connection string.- Parameters:
url- jdbc connection string- Returns:
- host of the database as a URI
- Throws:
java.net.URISyntaxException- in case of being unable to parse the connection string to a URI
-
getName
java.lang.String getName(java.lang.String url)
Extracts the database name from a jdbc connection string.- Parameters:
url- jdbc connection string- Returns:
- name of the database
-
-