Class LDAPHealthCheck


  • public class LDAPHealthCheck
    extends com.codahale.metrics.health.HealthCheck
    Simple LDAP connection (individual or pool) health check. Retrieves a specified entry from the directory to determine the LDAP connection health.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.codahale.metrics.health.HealthCheck

        com.codahale.metrics.health.HealthCheck.Result, com.codahale.metrics.health.HealthCheck.ResultBuilder
    • Constructor Summary

      Constructors 
      Constructor Description
      LDAPHealthCheck​(com.unboundid.ldap.sdk.LDAPInterface ldap, com.unboundid.ldap.sdk.DN testEntry, org.apache.logging.log4j.Logger log)
      Creates a new LDAP connection pool health check.
    • Constructor Detail

      • LDAPHealthCheck

        public LDAPHealthCheck​(com.unboundid.ldap.sdk.LDAPInterface ldap,
                               com.unboundid.ldap.sdk.DN testEntry,
                               org.apache.logging.log4j.Logger log)
        Creates a new LDAP connection pool health check.
        Parameters:
        ldap - The LDAP store. Must not be null.
        testEntry - LDAP entry to retrieve for the health check. Must not be null.
        log - Optional logger for health check errors, null if not required.
    • Method Detail

      • check

        public com.codahale.metrics.health.HealthCheck.Result check()
                                                             throws Exception
        Specified by:
        check in class com.codahale.metrics.health.HealthCheck
        Throws:
        Exception