Package org.opennms.features.jest.client
Class RequireConfigurationElasticHealthCheck
- java.lang.Object
-
- org.opennms.features.jest.client.ElasticHealthCheck
-
- org.opennms.features.jest.client.RequireConfigurationElasticHealthCheck
-
- All Implemented Interfaces:
HealthCheck
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 theopennms:health-check
would always fail, which may not be the desired behaviour.- Author:
- mvrueden
-
-
Constructor Summary
Constructors Constructor Description RequireConfigurationElasticHealthCheck(io.searchbox.client.JestClient jestClient, java.lang.String featureName, org.osgi.service.cm.ConfigurationAdmin configAdmin, java.lang.String pid)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Response
perform(Context context)
Implements the check itself, e.g.-
Methods inherited from class org.opennms.features.jest.client.ElasticHealthCheck
getDescription
-
-
-
-
Method Detail
-
perform
public Response perform(Context context)
Description copied from interface:HealthCheck
Implements the check itself, e.g. Connecting to a HTTP Endpoint. As the method is called by theHealthCheckService
, it is advised that all timeout restrictions etc are handled by the service instead of theHealthCheck
implementation. Implementations might throw an Exception, which should be handled by theHealthCheckService
as well. The response indicates if the check was successful, or encountered other problems. If null is returned, theHealthCheckService
should consider this asStatus.Unknown
.- Specified by:
perform
in interfaceHealthCheck
- Overrides:
perform
in classElasticHealthCheck
- Returns:
- The response indicating the Success/Failure/Timeout/etc of the check
- See Also:
HealthCheckService
-
-