Class PKIClient

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class PKIClient
    extends java.lang.Object
    implements java.lang.AutoCloseable
    • Field Detail

      • logger

        public static org.slf4j.Logger logger
      • MESSAGE_FORMATS

        public static final java.lang.String[] MESSAGE_FORMATS
      • messageFormat

        public javax.ws.rs.core.MediaType messageFormat
      • info

        public Info info
    • Constructor Detail

      • PKIClient

        public PKIClient​(ClientConfig config)
                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • PKIClient

        public PKIClient​(ClientConfig config,
                         CryptoProvider crypto)
                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • PKIClient

        public PKIClient​(ClientConfig config,
                         CryptoProvider crypto,
                         org.mozilla.jss.ssl.SSLCertificateApprovalCallback callback)
                  throws java.lang.Exception
        Throws:
        java.lang.Exception
    • Method Detail

      • getMessageFormat

        public javax.ws.rs.core.MediaType getMessageFormat()
      • createProxy

        public <T> T createProxy​(java.lang.String path,
                                 java.lang.Class<T> clazz)
                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getSubsystem

        public java.lang.String getSubsystem()
      • marshall

        public java.lang.Object marshall​(java.lang.Object request)
                                  throws java.lang.Exception
        Marshall request object with custom mapping if available.
        Throws:
        java.lang.Exception
      • unmarshall

        public <T> T unmarshall​(javax.ws.rs.core.Response response,
                                java.lang.Class<T> clazz)
                         throws java.lang.Exception
        Unmarshall response object using custom mapping if available.
        Throws:
        java.lang.Exception
      • handleErrorResponse

        public void handleErrorResponse​(javax.ws.rs.core.Response response)
                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getEntity

        public <T> T getEntity​(javax.ws.rs.core.Response response,
                               java.lang.Class<T> clazz)
                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getEntity

        public <T> T getEntity​(javax.ws.rs.core.Response response,
                               javax.ws.rs.core.GenericType<T> clazz)
                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • get

        public javax.ws.rs.core.Response get​(java.lang.String path)
                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • get

        public <T> T get​(java.lang.String path,
                         java.lang.Class<T> responseType)
                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • post

        public javax.ws.rs.core.Response post​(java.lang.String path)
                                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • post

        public <T> T post​(java.lang.String path,
                          java.lang.Class<T> responseType)
                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • post

        public javax.ws.rs.core.Response post​(java.lang.String path,
                                              javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> content)
                                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • post

        public <T> T post​(java.lang.String path,
                          javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> content,
                          java.lang.Class<T> responseType)
                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getInfo

        public Info getInfo()
                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • addRejectedCertStatus

        public void addRejectedCertStatus​(java.lang.Integer rejectedCertStatus)
      • setRejectedCertStatuses

        public void setRejectedCertStatuses​(java.util.Collection<java.lang.Integer> rejectedCertStatuses)
      • isRejected

        public boolean isRejected​(java.lang.Integer certStatus)
      • addIgnoredCertStatus

        public void addIgnoredCertStatus​(java.lang.Integer ignoredCertStatus)
      • setIgnoredCertStatuses

        public void setIgnoredCertStatuses​(java.util.Collection<java.lang.Integer> ignoredCertStatuses)
      • isIgnored

        public boolean isIgnored​(java.lang.Integer certStatus)
      • setOutput

        public void setOutput​(java.io.File output)
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable