public class HttpTSPRequest
extends java.lang.Object
URLConnection.setContentHandlerFactory(new TSPContentHandlerFactory());
The method GET is not implemented. Therefore, a Http TSP request read from an input stream must use the POST method.
This class should be used on the client side to send TSP request to a server over HTTP.
| Constructor and Description |
|---|
HttpTSPRequest(java.io.InputStream is)
Creates a new Http TSP Request by reading an input stream.
|
HttpTSPRequest(TSPTimeStampReq request,
java.net.URL url)
Creates a new Http TSP request.
|
| Modifier and Type | Method and Description |
|---|---|
TSPTimeStampReq |
getRequest()
Gets the TSP request of this http request.
|
TSPTimeStampResp |
getResponse()
Gets the TSP Message from the server.
|
static TSPTimeStampResp |
getResponse(TSPTimeStampReq request,
java.net.HttpURLConnection conn)
Gets the TSP Message from the server using the given
HttpURLConnection. |
public HttpTSPRequest(TSPTimeStampReq request, java.net.URL url)
Note: If the URL has and HTTPS protocol specifier, you will need to call the
URL.setURLStreamHandlerFactory method with a HttpsURLStreamHandlerFactory.
request - The request to send over http.url - The url to use to connect to the TSA server.public HttpTSPRequest(java.io.InputStream is)
throws java.io.IOException
is - The InputStream from which the HttpTSPRequest will be created.java.io.IOException - An I/O error occurred or the input encoding is incorrect.oracle.security.crypto.tsp.InvalidHttpRequestException - If the request is not an TSP Message over http.public static TSPTimeStampResp getResponse(TSPTimeStampReq request, java.net.HttpURLConnection conn) throws java.io.IOException
HttpURLConnection.
This method should be used on the client side in a context where calling the method
URL.setURLStreamHandlerFactory for HTTPS URLs is impractical.java.io.IOExceptionpublic TSPTimeStampResp getResponse() throws java.io.IOException
java.io.IOExceptionpublic TSPTimeStampReq getRequest()