Class LDAPHealthCheck

java.lang.Object
com.codahale.metrics.health.HealthCheck
com.nimbusds.common.ldap.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.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.codahale.metrics.health.HealthCheck.Result
     

    Methods inherited from class com.codahale.metrics.health.HealthCheck

    clock, execute

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • 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 Details

    • check

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