org.hyperledger.fabric_ca.sdk.HFCACertificateResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fabric-sdk-java Show documentation
Show all versions of fabric-sdk-java Show documentation
Java SDK for Hyperledger Fabric. Deprecated as of Fabric v2.5, replaced by org.hyperledger.fabric:fabric-gateway.
package org.hyperledger.fabric_ca.sdk;
import java.util.Collection;
/**
* The response from a certificate API request, contains the status code of the
* request and certificates that were retrieved
*/
public class HFCACertificateResponse {
private final int statusCode;
private final Collection certs;
/**
* Contains the response from the server with status code and credentials requested
*
* @param statusCode Status code of the HTTP request
* @param certs The certificates return from the GET request
*/
HFCACertificateResponse(int statusCode, Collection certs) {
this.statusCode = statusCode;
this.certs = certs;
}
/**
* Returns the status code of the request
*
* @return HTTP status code
*/
public int getStatusCode() {
return statusCode;
}
/**
* Returns the certificates that were retrieved from the GET certificate request
*
* @return Certificates
*/
public Collection getCerts() {
return certs;
}
}