## com.sun.jersey.client.urlconnection
Class HTTPSProperties

    java.lang.Object
      com.sun.jersey.client.urlconnection.HTTPSProperties

    public class HTTPSProperties

extends java.lang.Object

HTTPS properties for SSL configuration of a `HttpsURLConnection`.

An instance of this class may be added as a property of the `Client` or `ClientRequest` using the property name `PROPERTY_HTTPS_PROPERTIES`.

Author:
  pavel.bucek@sun.com

Field Summary
`static java.lang.String` | `PROPERTY_HTTPS_PROPERTIES` HTTPS properties property.

Constructor Summary
`HTTPSProperties()` Construct default properties with no `HostnameVerifier` and a `SSLContext` constructed using `SSLContext.getInstance("SSL")`.
`HTTPSProperties(javax.net.ssl.HostnameVerifier hv)` Construct with a `HostnameVerifier` and a `SSLContext` constructed using `SSLContext.getInstance("SSL")`.
`HTTPSProperties(javax.net.ssl.HostnameVerifier hv, javax.net.ssl.SSLContext c)` Construct with a `HostnameVerifier` and a `SSLContext`.

Method Summary
`javax.net.ssl.HostnameVerifier` | `getHostnameVerifier()` Get the P`HostnameVerifier`.
`javax.net.ssl.SSLContext` | `getSSLContext()` Get the `SSLContext`.
`void` | `setConnection(javax.net.ssl.HttpsURLConnection connection)` Set the `HttpsURLConnection` with the HTTPS properties.

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

Field Detail

### PROPERTY_HTTPS_PROPERTIES

    public static final java.lang.String PROPERTY_HTTPS_PROPERTIES

  HTTPS properties property. The value MUST be an instance of `HTTPSProperties`. If the property is absent then HTTPS properties will not be used.

  See Also:
    Constant Field Values

Constructor Detail

### HTTPSProperties

    public HTTPSProperties()
                    throws java.security.NoSuchAlgorithmException

  Construct default properties with no `HostnameVerifier` and a `SSLContext` constructed using `SSLContext.getInstance("SSL")`.

  Throws:
    `java.security.NoSuchAlgorithmException` - if the SSLContext could not be created.

### HTTPSProperties

    public HTTPSProperties(javax.net.ssl.HostnameVerifier hv)
                    throws java.security.NoSuchAlgorithmException

  Construct with a `HostnameVerifier` and a `SSLContext` constructed using `SSLContext.getInstance("SSL")`.

  Parameters:
    `hv` - the HostnameVerifier.
  Throws:
    `java.security.NoSuchAlgorithmException` - if the SSLContext could not be created.

### HTTPSProperties

    public HTTPSProperties(javax.net.ssl.HostnameVerifier hv,
                           javax.net.ssl.SSLContext c)

  Construct with a `HostnameVerifier` and a `SSLContext`.

  Parameters:
    `hv` - the HostnameVerifier.
    `c` - the SSLContext. Must not be null.

Method Detail

### getHostnameVerifier

    public javax.net.ssl.HostnameVerifier getHostnameVerifier()

  Get the P`HostnameVerifier`.

  Returns:
    the HostnameVerifier, is `null` if not set at construction.

### getSSLContext

    public javax.net.ssl.SSLContext getSSLContext()

  Get the `SSLContext`.

  Returns:
    the SSLContext.

### setConnection

    public void setConnection(javax.net.ssl.HttpsURLConnection connection)

  Set the `HttpsURLConnection` with the HTTPS properties.

  Parameters:
    `connection` - the HttpsURLConnection.

Copyright © 2017 Oracle Corporation. All Rights Reserved.