public class RequireConfigurationElasticHealthCheck extends ElasticHealthCheck
ElasticHealthCheck that requires configuration to be present in order to actually verify the connection.
This is required as some features may be installed but the connection to Elasticsearch may not be configured yet,
meaning the opennms:health-check would always fail, which may not be the desired behaviour.| Constructor and Description |
|---|
RequireConfigurationElasticHealthCheck(io.searchbox.client.JestClient jestClient,
String featureName,
org.osgi.service.cm.ConfigurationAdmin configAdmin,
String pid) |
| Modifier and Type | Method and Description |
|---|---|
Response |
perform(Context context)
Implements the check itself, e.g.
|
getDescriptionpublic Response perform(Context context)
HealthCheckHealthCheckService, it is advised that all timeout restrictions
etc are handled by the service instead of the HealthCheck implementation.
Implementations might throw an Exception, which should be handled by the HealthCheckService as well.
The response indicates if the check was successful, or encountered other problems. If null is returned,
the HealthCheckService should consider this as Status.Unknown.perform in interface HealthCheckperform in class ElasticHealthCheckHealthCheckServiceCopyright © 2022. All rights reserved.