Interface BackingChecker
- All Known Implementing Classes:
DBCheck
,ElasticSearchChecker
,KafkaChecker
,MongoDBChecker
public interface BackingChecker
A backing checker checks for the availability of a backing service.
- Since:
- 9.2
- API Note:
- Reworked in 11.5.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
accepts
(ConfigurationHolder configHolder) Test if the check has to be done for the given configuration.void
check
(ConfigurationHolder configHolder) Test the availability of the backing service.default <T> T
getDescriptor
(ConfigurationHolder configHolder, String configName, Class<T> klass) Creates a descriptor instance for the specified file and descriptor class.default <T> T
getDescriptor
(ConfigurationHolder configHolder, String configName, Class<T> klass, Class<?>... klasses) Creates a descriptor instance for the specified file and descriptor class.default <T> T
getDescriptor
(ConfigurationHolder configHolder, String configName, Class<T> klass, UnaryOperator<String> replacer) default <T> T
getDescriptor
(ConfigurationHolder configHolder, String configName, Class<T> klass, UnaryOperator<String> replacer, Class<?>... klasses) Creates a descriptor instance for the specified file and descriptor class.
-
Method Details
-
accepts
Test if the check has to be done for the given configuration.- Parameters:
configHolder
- The current configuration- Returns:
- true if
check(ConfigurationHolder)
has to be called.
-
check
Test the availability of the backing service.- Parameters:
configHolder
- The current configuration- Throws:
ConfigurationException
- if backing service is not available.
-
getDescriptor
default <T> T getDescriptor(ConfigurationHolder configHolder, String configName, Class<T> klass) throws ConfigurationException Creates a descriptor instance for the specified file and descriptor class.- Throws:
ConfigurationException
-
getDescriptor
default <T> T getDescriptor(ConfigurationHolder configHolder, String configName, Class<T> klass, Class<?>... klasses) throws ConfigurationException Creates a descriptor instance for the specified file and descriptor class. The last parameter is used to register the descriptor classes to XMap when the desired descriptor is an abstract class.- Throws:
ConfigurationException
- Since:
- 2021.10
-
getDescriptor
default <T> T getDescriptor(ConfigurationHolder configHolder, String configName, Class<T> klass, UnaryOperator<String> replacer) throws ConfigurationException - Throws:
ConfigurationException
- Since:
- 2021.10
-
getDescriptor
default <T> T getDescriptor(ConfigurationHolder configHolder, String configName, Class<T> klass, UnaryOperator<String> replacer, Class<?>... klasses) throws ConfigurationException Creates a descriptor instance for the specified file and descriptor class.- Throws:
ConfigurationException
-