diff options
author | Christina Fu <cfu@redhat.com> | 2014-03-03 15:52:55 -0800 |
---|---|---|
committer | Christina Fu <cfu@redhat.com> | 2014-03-06 19:33:35 -0800 |
commit | 61ec5553e416733996be05fda16983d32252000c (patch) | |
tree | 61f7a81cec53df149113d4c73cd1c1836904cb35 /base/common/src/com/netscape/certsrv/connector | |
parent | 35fcdc2ca9c5ef42ccdddcbfdf484c4f66a720fc (diff) | |
download | pki-61ec5553e416733996be05fda16983d32252000c.tar.gz pki-61ec5553e416733996be05fda16983d32252000c.tar.xz pki-61ec5553e416733996be05fda16983d32252000c.zip |
trac ticket #862 - TPS rewrite: provide connector service for JAVA-based TPS subsystem
Diffstat (limited to 'base/common/src/com/netscape/certsrv/connector')
3 files changed, 46 insertions, 0 deletions
diff --git a/base/common/src/com/netscape/certsrv/connector/IConnector.java b/base/common/src/com/netscape/certsrv/connector/IConnector.java index 02e7231ab..6eda896c4 100644 --- a/base/common/src/com/netscape/certsrv/connector/IConnector.java +++ b/base/common/src/com/netscape/certsrv/connector/IConnector.java @@ -19,6 +19,7 @@ package com.netscape.certsrv.connector; import com.netscape.certsrv.base.EBaseException; import com.netscape.certsrv.request.IRequest; +import com.netscape.cmsutil.http.HttpResponse; /** * This interface represents a connector that forwards @@ -55,6 +56,17 @@ public interface IConnector { throws EBaseException; /** + * Sends the request to a remote authority. + * + * @param op operation to determine receiving servlet (multi-uri support) + * @param msg Request to be forwarded to remote authority. + * @return HttpResponse to be parsed by client + * @exception EBaseException Failure to send request to remote authority. + */ + public HttpResponse send(String op, String msg) + throws EBaseException; + + /** * Starts this connector. */ public void start(); diff --git a/base/common/src/com/netscape/certsrv/connector/IHttpConnection.java b/base/common/src/com/netscape/certsrv/connector/IHttpConnection.java index 8adc7da72..2e871851b 100644 --- a/base/common/src/com/netscape/certsrv/connector/IHttpConnection.java +++ b/base/common/src/com/netscape/certsrv/connector/IHttpConnection.java @@ -18,6 +18,7 @@ package com.netscape.certsrv.connector; import com.netscape.certsrv.base.EBaseException; +import com.netscape.cmsutil.http.HttpResponse; /** * This represents a HTTP connection to a remote authority. @@ -38,4 +39,14 @@ public interface IHttpConnection { */ public IPKIMessage send(IPKIMessage tomsg) throws EBaseException; + + /** + * Sends the message to the remote authority. + * + * @param msg Message to forward to authority. + * @return HttpResponse response to be parsed by the client + * @exception EBaseException Failed to send message. + */ + public HttpResponse send(String msg) + throws EBaseException; } diff --git a/base/common/src/com/netscape/certsrv/connector/IRemoteAuthority.java b/base/common/src/com/netscape/certsrv/connector/IRemoteAuthority.java index f02154021..1e66daa81 100644 --- a/base/common/src/com/netscape/certsrv/connector/IRemoteAuthority.java +++ b/base/common/src/com/netscape/certsrv/connector/IRemoteAuthority.java @@ -17,6 +17,8 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.connector; +import java.util.Hashtable; + /** * This represents a remote authority that can be * a certificate manager, or key recovery manager or @@ -48,9 +50,30 @@ public interface IRemoteAuthority { public String getURI(); /** + * Retrieves the list of URIs supported by the remote Authority + * (multi-URI support) + */ + public Hashtable<String, String> getURIs(); + + /** + * Retrieves an URI by operation + * (multi-URI support) + * @param op operation to determine the receiving servlet + */ + public String getURI(String op); + + /** * Retrieves the timeout value for the connection to the remote Authority. * * @return In with remote Authority timeout value. */ public int getTimeout(); + + /** + * Retrieves the Content-Type value of the connection to the Remote Authority. + * + * @return String with Content-Type, if it was set + * @return + */ + public String getContentType(); } |