Class NettyDnsHealthCheck
- java.lang.Object
-
- org.opennms.netmgt.dnsresolver.netty.NettyDnsHealthCheck
-
- All Implemented Interfaces:
HealthCheck
public class NettyDnsHealthCheck extends java.lang.Object implements HealthCheck
-
-
Constructor Summary
Constructors Constructor Description NettyDnsHealthCheck(NettyDnsResolver dnsResolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDescription()The description of theHealthCheck, e.g.Responseperform(Context context)Implements the check itself, e.g.
-
-
-
Constructor Detail
-
NettyDnsHealthCheck
public NettyDnsHealthCheck(NettyDnsResolver dnsResolver)
-
-
Method Detail
-
getDescription
public java.lang.String getDescription()
Description copied from interface:HealthCheckThe description of theHealthCheck, e.g. "Connecting to OpenNMS ReST API". This is used when visualizing the progress or result of the checks.- Specified by:
getDescriptionin interfaceHealthCheck- Returns:
- The string, describing the check.
-
perform
public Response perform(Context context) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException
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- Returns:
- The response indicating the Success/Failure/Timeout/etc of the check
- Throws:
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionjava.util.concurrent.TimeoutException- See Also:
HealthCheckService
-
-