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
ElasticHealthCheckthat 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-checkwould 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 Responseperform(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:HealthCheckImplements 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 theHealthCheckimplementation. Implementations might throw an Exception, which should be handled by theHealthCheckServiceas well. The response indicates if the check was successful, or encountered other problems. If null is returned, theHealthCheckServiceshould consider this asStatus.Unknown.- Specified by:
performin interfaceHealthCheck- Overrides:
performin classElasticHealthCheck- Returns:
- The response indicating the Success/Failure/Timeout/etc of the check
- See Also:
HealthCheckService
-
-