Package com.avaya.clientservices.provider.certificate

## Interface CertificateStatusListener

-     public interface CertificateStatusListener

  Certificate status listener interface is implemented by the client applications wishing to be notified about the certificate's status.

  Client applications can register multiple status listeners by calling `CertificateManager.addCertificateStatusListener(CertificateStatusListener)`. The listeners would be notified via `onCertificateExpiryNotification(X509Certificate, int)`. The callback method `onCertificateExpiryNotification(X509Certificate, int)` notifies the expiration details only for the client identity certificate. Client application can configure such notification commencement period by calling SecurityPolicyConfiguration.setCertificateRenewalValue(int).

  If client application does not wish to be notified any longer they can remove the listener by calling `CertificateManager.removeCertificateStatusListener(CertificateStatusListener)` or choose not to register the listener.

  See Also:
    `SecurityPolicyConfiguration`, `CertificateManager.setClientIdentityCertificateChain(X509Certificate[], PrivateKey)`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `onCertificateExpiryNotification​(java.security.cert.X509Certificate certificate, int numberOfDaysToExpiry)` | Notifies the registered listeners about the number of days before certificate expires.

- - ### Method Detail

    - #### onCertificateExpiryNotification

          void onCertificateExpiryNotification​(java.security.cert.X509Certificate certificate,
                                               int numberOfDaysToExpiry)

      Notifies the registered listeners about the number of days before certificate expires.

      This method provides the notification about the client identity certificate only.

      Parameters:
        `certificate` - X509Certificate for which notification is issued.
        `numberOfDaysToExpiry` - Number of days before the certificate expires.