Class CertificatesCache


  • public final class CertificatesCache
    extends java.lang.Object

    Class that represents the certificates validation responses cache for @Firma certificates validation web service.

    Project:

    Library for the integration with the services of @Firma, eVisor and TS@.

    Version:
    1.1, 18/04/2022.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String get​(CertificateCacheKey key)
      Method that retrieves from the certificates validation responses cache the response XML for certain certificate.
      static CertificatesCache getInstance​(java.lang.String idClient)
      Method that obtains the unique instance of the class.
      boolean put​(CertificateCacheKey key, java.lang.String xmlResponse)
      Method that adds/updates an element into the certificates validation responses cache.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getInstance

        public static CertificatesCache getInstance​(java.lang.String idClient)
                                             throws WSServiceInvokerException
        Method that obtains the unique instance of the class.
        Parameters:
        idClient - Parameter that represents the client application identifier.
        Returns:
        the unique instance of the class.
        Throws:
        WSServiceInvokerException - If there is an error.
      • put

        public boolean put​(CertificateCacheKey key,
                           java.lang.String xmlResponse)
        Method that adds/updates an element into the certificates validation responses cache.
        Parameters:
        key - Parameter that represents the key of the element to add/update. This key is the issuer and the serial number of the certificate.
        xmlResponse - Parameter that represents the XML with the certificate validation response from @Firma.
        Returns:
        a boolean that indicates if the element has been added/updated (true) or not (false).
      • get

        public java.lang.String get​(CertificateCacheKey key)
        Method that retrieves from the certificates validation responses cache the response XML for certain certificate.
        Parameters:
        key - Parameter that represents the key (issuer and serial number) for the certificates validation responses cache.
        Returns:
        the response XML of the certificate or null if the entry doesn't exist or the entry has expired.