Skip navigation links

Oracle Fusion Middleware PKI SDK TSP Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10677-04


oracle.security.crypto.tsp
Class HttpTSPRequest

java.lang.Object
  extended by oracle.security.crypto.tsp.HttpTSPRequest


public class HttpTSPRequest
extends java.lang.Object

Implementation of TSP over HTTP. Before using the method getResponse, be sure to have set the right content handler factory in your application by calling:
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 Summary
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.

 

Method Summary
 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.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

HttpTSPRequest

public HttpTSPRequest(TSPTimeStampReq request,
                      java.net.URL url)
Creates a new Http TSP request. This constructor should be used on the client side.

Note: If the URL has and HTTPS protocol specifier, you will need to call the URL.setURLStreamHandlerFactory method with a HttpsURLStreamHandlerFactory.

Parameters:
request - The request to send over http.
url - The url to use to connect to the TSA server.

HttpTSPRequest

public HttpTSPRequest(java.io.InputStream is)
               throws java.io.IOException
Creates a new Http TSP Request by reading an input stream. This constructor should be used on the server side.
Parameters:
is - The InputStream from which the HttpTSPRequest will be created.
Throws:
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.

Method Detail

getResponse

public static TSPTimeStampResp getResponse(TSPTimeStampReq request,
                                           java.net.HttpURLConnection conn)
                                    throws java.io.IOException
Gets the TSP Message from the server using the given HttpURLConnection. This method should be used on the client side in a context where calling the method URL.setURLStreamHandlerFactory for HTTPS URLs is impractical.
Throws:
java.io.IOException

getResponse

public TSPTimeStampResp getResponse()
                             throws java.io.IOException
Gets the TSP Message from the server. This method should be used on the client side.
Returns:
An TSPTimeStampReq object representing the response from the server on this HttpTSPRequest.
Throws:
java.io.IOException

getRequest

public TSPTimeStampReq getRequest()
Gets the TSP request of this http request.
Returns:
An TSPTimeStampReq object representing the request of this HttpTSPRequest object.

Skip navigation links

Oracle Fusion Middleware PKI SDK TSP Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10677-04


Copyright © 2005, 2011 , Oracle. All rights reserved.