Class OCSPRespBC

  • All Implemented Interfaces:
    IOCSPResp

    public class OCSPRespBC
    extends java.lang.Object
    implements IOCSPResp
    Wrapper class for OCSPResp.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static OCSPRespBC INSTANCE  
      private org.bouncycastle.cert.ocsp.OCSPResp ocspResp  
      private static int SUCCESSFUL  
    • Constructor Summary

      Constructors 
      Constructor Description
      OCSPRespBC​(IOCSPResponse ocspResponse)
      Creates new wrapper instance for OCSPResp.
      OCSPRespBC​(org.bouncycastle.cert.ocsp.OCSPResp ocspResp)
      Creates new wrapper instance for OCSPResp.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)
      Indicates whether some other object is "equal to" this one.
      byte[] getEncoded()
      Calls actual getEncoded method for the wrapped OCSPResp object.
      static OCSPRespBC getInstance()
      Gets wrapper instance.
      org.bouncycastle.cert.ocsp.OCSPResp getOcspResp()
      Gets actual org.bouncycastle object being wrapped.
      java.lang.Object getResponseObject()
      Calls actual getResponseObject method for the wrapped OCSPResp object.
      int getStatus()
      Calls actual getStatus method for the wrapped OCSPResp object.
      int getSuccessful()
      Gets SUCCESSFUL constant for the wrapped OCSPResp.
      int hashCode()
      Returns a hash code value based on the wrapped object.
      java.lang.String toString()
      Delegates toString method call to the wrapped object.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • INSTANCE

        private static final OCSPRespBC INSTANCE
      • ocspResp

        private final org.bouncycastle.cert.ocsp.OCSPResp ocspResp
    • Constructor Detail

      • OCSPRespBC

        public OCSPRespBC​(org.bouncycastle.cert.ocsp.OCSPResp ocspResp)
        Creates new wrapper instance for OCSPResp.
        Parameters:
        ocspResp - OCSPResp to be wrapped
      • OCSPRespBC

        public OCSPRespBC​(IOCSPResponse ocspResponse)
        Creates new wrapper instance for OCSPResp.
        Parameters:
        ocspResponse - OCSPResponse wrapper
    • Method Detail

      • getInstance

        public static OCSPRespBC getInstance()
        Gets wrapper instance.
        Returns:
        OCSPRespBC instance.
      • getOcspResp

        public org.bouncycastle.cert.ocsp.OCSPResp getOcspResp()
        Gets actual org.bouncycastle object being wrapped.
        Returns:
        wrapped OCSPResp.
      • getEncoded

        public byte[] getEncoded()
                          throws java.io.IOException
        Calls actual getEncoded method for the wrapped OCSPResp object.
        Specified by:
        getEncoded in interface IOCSPResp
        Returns:
        the default encoding for the wrapped object.
        Throws:
        java.io.IOException - on encoding error.
      • getStatus

        public int getStatus()
        Calls actual getStatus method for the wrapped OCSPResp object.
        Specified by:
        getStatus in interface IOCSPResp
        Returns:
        status value.
      • getSuccessful

        public int getSuccessful()
        Gets SUCCESSFUL constant for the wrapped OCSPResp.
        Specified by:
        getSuccessful in interface IOCSPResp
        Returns:
        OCSPResp.SUCCESSFUL value.
      • equals

        public boolean equals​(java.lang.Object o)
        Indicates whether some other object is "equal to" this one. Compares wrapped objects.
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Returns a hash code value based on the wrapped object.
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Delegates toString method call to the wrapped object.
        Overrides:
        toString in class java.lang.Object