Package | Class | Tree | Deprecated | Index | Help
| Oracle Security Developer Tools PKI SDK OCSP Java API Reference 10g Release 3 (10.1.3) B25375-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.security.crypto.ocsp
Class HttpOCSPRequest

`java.lang.Object
oracle.security.crypto.ocsp.HttpOCSPRequest`

public class HttpOCSPRequest
extends java.lang.Object

Implementation of OCSP over HTTP for requests. Before using the method getResponse, be sure to have set the right content handler factory in your application by calling:
`URLConnection.setContentHandlerFactory(new OCSPContentHandlerFactory());`

The method GET is not implemented. Therefore, a Http OCSP Request read from an input stream must use the POST method.

Constructor Summary
`HttpOCSPRequest(java.io.InputStream is)` Creates a new Http OCSP Request by reading an input stream.
`HttpOCSPRequest(OCSPRequest request, java.net.URL url)` Creates a new Http OCSP request.

Method Summary
`OCSPRequest` | `getRequest()` Gets the request of this http request.
`OCSPResponse` | `getResponse()` Gets the OCSPResponse from the server.
`static OCSPResponse` | `getResponse(OCSPRequest request, java.net.HttpURLConnection conn)` Gets the OCSPResponse 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

### HttpOCSPRequest

    public HttpOCSPRequest(OCSPRequest request,
                           java.net.URL url)

  Creates a new Http OCSP 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 OCSP server.

### HttpOCSPRequest

    public HttpOCSPRequest(java.io.InputStream is)
                    throws java.io.IOException

  Creates a new Http OCSP Request by reading an input stream. This constructor should be used on the server side.
Parameters:
  `is` - The InputStream from which the HttpOCSPRequest will be created.
Throws:
  `java.io.IOException`
  `InvalidHttpRequestException` - if the request is not an OCSP request over http.

Method Detail

### getResponse

    public static OCSPResponse getResponse(OCSPRequest request,
                                           java.net.HttpURLConnection conn)
                                    throws java.io.IOException

  Gets the OCSPResponse 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 OCSPResponse getResponse()
                             throws java.io.IOException

  Gets the OCSPResponse from the server. This method should be used on the client side.
  Returns:
    An OCSPResponse object representing the response from the server on this HttpOCSPrequest.
  Throws:
    `java.io.IOException`

### getRequest

    public OCSPRequest getRequest()

  Gets the request of this http request.
  Returns:
    An OCSPRequest object representing the request of this HttpOCSPRequest object.

Package | Class | Tree | Deprecated | Index | Help
| Oracle Security Developer Tools PKI SDK OCSP Java API Reference 10g Release 3 (10.1.3) B25375-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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