summaryrefslogtreecommitdiffstats
path: root/base/common/src/com/netscape/certsrv/cert/CertClient.java
diff options
context:
space:
mode:
authorEndi Sukma Dewata <edewata@redhat.com>2012-10-08 16:52:53 -0400
committerEndi Sukma Dewata <edewata@redhat.com>2012-10-18 16:46:09 -0500
commit4300459bff057ba50093f735ee9289868e258215 (patch)
treea708d2946eff5da01218ac200ae11c6d1ed33a32 /base/common/src/com/netscape/certsrv/cert/CertClient.java
parent643c089887db3369363e2b88dde19ef3a97029a2 (diff)
downloadpki-4300459bff057ba50093f735ee9289868e258215.tar.gz
pki-4300459bff057ba50093f735ee9289868e258215.tar.xz
pki-4300459bff057ba50093f735ee9289868e258215.zip
Added PKIConnection.
The code in PKIClient has been refactored into PKIConnection such that a single connection object can be used by several REST clients. The PKIClient will remain the base class for all REST clients. Ticket #357
Diffstat (limited to 'base/common/src/com/netscape/certsrv/cert/CertClient.java')
-rw-r--r--base/common/src/com/netscape/certsrv/cert/CertClient.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/base/common/src/com/netscape/certsrv/cert/CertClient.java b/base/common/src/com/netscape/certsrv/cert/CertClient.java
index a92e63522..da60ed085 100644
--- a/base/common/src/com/netscape/certsrv/cert/CertClient.java
+++ b/base/common/src/com/netscape/certsrv/cert/CertClient.java
@@ -21,6 +21,7 @@ import java.net.URISyntaxException;
import com.netscape.certsrv.client.ClientConfig;
import com.netscape.certsrv.client.PKIClient;
+import com.netscape.certsrv.client.PKIConnection;
import com.netscape.certsrv.dbs.certdb.CertId;
import com.netscape.certsrv.request.RequestId;
@@ -32,9 +33,17 @@ public class CertClient extends PKIClient {
public CertResource certClient;
public CertRequestResource certRequestResource;
+ public CertClient(PKIConnection connection) throws URISyntaxException {
+ super(connection);
+ init();
+ }
+
public CertClient(ClientConfig config) throws URISyntaxException {
super(config);
+ init();
+ }
+ public void init() throws URISyntaxException {
certClient = createProxy(CertResource.class);
certRequestResource = createProxy(CertRequestResource.class);
}