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.
|
getDescription
public Response perform(Context context)
HealthCheck
HealthCheckService
, 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 HealthCheck
perform
in class ElasticHealthCheck
HealthCheckService
Copyright © 2021. All rights reserved.