Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
javax.net.ssl

Class HttpsURLConnection

HttpURLConnection
|
+--javax.net.ssl.HttpsURLConnection


public abstract class HttpsURLConnection

extends HttpURLConnection

A URL connection that connects via the Secure Socket Layer (SSL) for HTTPS connections. This class may be used in the same way as HttpURLConnection, and it will transparently negotiate the SSL connection.

Author:

Field Summary

javax.net.ssl.HostnameVerifierhostnameVerifier

The hostname verifier used for this connection.

Constructor Summary

HttpsURLConnection(URL url)

Creates a new HTTPS URL connection.

Method Summary

StringgetCipherSuite()

Returns the cipher name negotiated for this connection.
static javax.net.ssl.HostnameVerifiergetDefaultHostnameVerifier()

Returns the default hostname verifier used in all new connections.
static javax.net.ssl.SSLSocketFactorygetDefaultSSLSocketFactory()

Returns the default SSL socket factory used in all new connections.
javax.net.ssl.HostnameVerifiergetHostnameVerifier()

Returns the current hostname verifier for this instance.
Certificate[]getLocalCertificates()

Returns the certificates used on the local side in this connection.
javax.net.ssl.SSLSocketFactorygetSSLSocketFactory()

Returns the current SSL socket factory for this instance.
Certificate[]getServerCertificates()

Returns the certificates sent by the other party.
static voidsetDefaultHostnameVerifier(javax.net.ssl.HostnameVerifier newDefault)

Sets the default hostname verifier to be used in all new connections.
static voidsetDefaultSSLSocketFactory(javax.net.ssl.SSLSocketFactory newDefault)

Sets the default SSL socket factory to be used in all new connections.
voidsetHostnameVerifier(javax.net.ssl.HostnameVerifier hostnameVerifier)

Sets the hostname verifier for this instance.
voidsetSSLSocketFactory(javax.net.ssl.SSLSocketFactory factory)

Sets the SSL socket factory for this instance.

Field Details

hostnameVerifier

protected HostnameVerifier hostnameVerifier

The hostname verifier used for this connection.


Constructor Details

HttpsURLConnection

protected HttpsURLConnection(URL url)

Creates a new HTTPS URL connection.

Parameters:

Throws:


Method Details

getCipherSuite

public String getCipherSuite()

Returns the cipher name negotiated for this connection.

Returns:

Throws:


getDefaultHostnameVerifier

public static HostnameVerifier getDefaultHostnameVerifier()

Returns the default hostname verifier used in all new connections.

Returns:


getDefaultSSLSocketFactory

public static SSLSocketFactory getDefaultSSLSocketFactory()

Returns the default SSL socket factory used in all new connections.

Returns:


getHostnameVerifier

public HostnameVerifier getHostnameVerifier()

Returns the current hostname verifier for this instance.

Returns:


getLocalCertificates

public Certificate[] getLocalCertificates()

Returns the certificates used on the local side in this connection.

Returns:

Throws:


getSSLSocketFactory

public SSLSocketFactory getSSLSocketFactory()

Returns the current SSL socket factory for this instance.

Returns:


getServerCertificates

public Certificate[] getServerCertificates()

Returns the certificates sent by the other party.

Returns:

Throws:


setDefaultHostnameVerifier

public static void setDefaultHostnameVerifier(javax.net.ssl.HostnameVerifier newDefault)

Sets the default hostname verifier to be used in all new connections.

Parameters:

Throws:


setDefaultSSLSocketFactory

public static void setDefaultSSLSocketFactory(javax.net.ssl.SSLSocketFactory newDefault)

Sets the default SSL socket factory to be used in all new connections.

Parameters:

Throws:


setHostnameVerifier

public void setHostnameVerifier(javax.net.ssl.HostnameVerifier hostnameVerifier)

Sets the hostname verifier for this instance.

Parameters:

Throws:


setSSLSocketFactory

public void setSSLSocketFactory(javax.net.ssl.SSLSocketFactory factory)

Sets the SSL socket factory for this instance.

Parameters:

Throws: