com.sun.jersey.client.urlconnection
Class HTTPSProperties

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

public class HTTPSProperties
extends 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 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(HostnameVerifier hv)
          Construct with a HostnameVerifier and a SSLContext constructed using SSLContext.getInstance("SSL").
HTTPSProperties(HostnameVerifier hv, SSLContext c)
          Construct with a HostnameVerifier and a SSLContext.
 
Method Summary
 HostnameVerifier getHostnameVerifier()
          Get the PHostnameVerifier.
 SSLContext getSSLContext()
          Get the SSLContext.
 void setConnection(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 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 NoSuchAlgorithmException
Construct default properties with no HostnameVerifier and a SSLContext constructed using SSLContext.getInstance("SSL").

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

HTTPSProperties

public HTTPSProperties(HostnameVerifier hv)
                throws NoSuchAlgorithmException
Construct with a HostnameVerifier and a SSLContext constructed using SSLContext.getInstance("SSL").

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

HTTPSProperties

public HTTPSProperties(HostnameVerifier hv,
                       SSLContext c)
Construct with a HostnameVerifier and a SSLContext.

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

getHostnameVerifier

public HostnameVerifier getHostnameVerifier()
Get the PHostnameVerifier.

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

getSSLContext

public SSLContext getSSLContext()
Get the SSLContext.

Returns:
the SSLContext.

setConnection

public void setConnection(HttpsURLConnection connection)
Set the HttpsURLConnection with the HTTPS properties.

Parameters:
connection - the HttpsURLConnection.


Copyright © 2011 Oracle Corporation. All Rights Reserved.