Name

Class com.sun.net.ssl.HttpsURLConnection

Synopsis

This class implements an HTTPS connection to a particular server. You can use the static methods of this class to set global parameters (cipher suites, etc.) that apply to all subsequent HTTPS connections, and you can obtain information about the connection directly from the object. It is used most often to set the hostname verifier or the cipher suite for the connection.

Class Definition

public abstract class com.sun.net.ssl.HttpsURLConnection
    extends java.net.HttpURLConnection {

    // Variables
    protected HostnameVerifier hostnameVerifier;
    protected SSLSocketFactory sslSocketFactory;

    // Constructors
    public HttpsURLConnection(URL);

    // Class Methods
    public static HostnameVerifier getDefaultHostnameVerifier(  );
    public static SSLSocketFactory getDefaultSSLSocketFactory(  );
    public static void setDefaultHostnameVerifier(HostnameVerifier);
    public static void setDefaultSSLSocketFactory(SSLSocketFactory);

    // Instance Methods
    public abstract String getCipherSuite(  );
    public HostnameVerifier getHostnameVerifier(  );
    public SSLSocketFactory getSSLSocketFactory(  );
    public abstract javax.security.cert.X509Certificate[]
                                        getServerCertificateChain(  );
    public void setHostnameVerifier(HostnameVerifier);
    public void setSSLSocketFactory(SSLSocketFactory);
}

See also

HostnameVerifier

Get Java Security, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.