Final

javax.net.ssl
Class HttpsURLConnection

java.lang.Object
  extended by java.net.URLConnection
      extended by java.net.HttpURLConnection
          extended by javax.net.ssl.HttpsURLConnection

public abstract class HttpsURLConnection
extends HttpURLConnection

Abstract class represents https connections


Field Summary
protected  HostnameVerifier hostnameVerifier
          The host name verifier for this https url connection
 
Fields inherited from class java.net.HttpURLConnection
HTTP_ACCEPTED, HTTP_BAD_GATEWAY, HTTP_BAD_METHOD, HTTP_BAD_REQUEST, HTTP_CLIENT_TIMEOUT, HTTP_CONFLICT, HTTP_CREATED, HTTP_ENTITY_TOO_LARGE, HTTP_FORBIDDEN, HTTP_GATEWAY_TIMEOUT, HTTP_GONE, HTTP_INTERNAL_ERROR, HTTP_LENGTH_REQUIRED, HTTP_MOVED_PERM, HTTP_MOVED_TEMP, HTTP_MULT_CHOICE, HTTP_NO_CONTENT, HTTP_NOT_ACCEPTABLE, HTTP_NOT_AUTHORITATIVE, HTTP_NOT_FOUND, HTTP_NOT_IMPLEMENTED, HTTP_NOT_MODIFIED, HTTP_OK, HTTP_PARTIAL, HTTP_PAYMENT_REQUIRED, HTTP_PRECON_FAILED, HTTP_PROXY_AUTH, HTTP_REQ_TOO_LONG, HTTP_RESET, HTTP_SEE_OTHER, HTTP_SERVER_ERROR, HTTP_UNAUTHORIZED, HTTP_UNAVAILABLE, HTTP_UNSUPPORTED_TYPE, HTTP_USE_PROXY, HTTP_VERSION, instanceFollowRedirects, method, responseCode, responseMessage
 
Fields inherited from class java.net.URLConnection
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches
 
Constructor Summary
protected HttpsURLConnection(URL httpsURL)
           
 
Method Summary
abstract  String getCipherSuite()
           
static HostnameVerifier getDefaultHostnameVerifier()
           
static SSLSocketFactory getDefaultSSLSocketFactory()
           
 HostnameVerifier getHostnameVerifier()
           
abstract  Certificate[] getLocalCertificates()
           
abstract  Certificate[] getServerCertificates()
           
 SSLSocketFactory getSSLSocketFactory()
           
static void setDefaultHostnameVerifier(HostnameVerifier verifier)
           
static void setDefaultSSLSocketFactory(SSLSocketFactory aFactory)
           
 void setHostnameVerifier(HostnameVerifier verifier)
          Sets the hostname verifier
 void setSSLSocketFactory(SSLSocketFactory aFactory)
           
 
Methods inherited from class java.net.HttpURLConnection
disconnect, getErrorStream, getFollowRedirects, getHeaderFieldDate, getInstanceFollowRedirects, getPermission, getRequestMethod, getResponseCode, getResponseMessage, setFollowRedirects, setInstanceFollowRedirects, setRequestMethod, usingProxy
 
Methods inherited from class java.net.URLConnection
addRequestProperty, connect, getAllowUserInteraction, getContent, getContent, getContentEncoding, getContentLength, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderField, getHeaderFieldInt, getHeaderFieldKey, getHeaderFields, getIfModifiedSince, getInputStream, getLastModified, getOutputStream, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setRequestProperty, setUseCaches, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

hostnameVerifier

protected HostnameVerifier hostnameVerifier
The host name verifier for this https url connection

Constructor Detail

HttpsURLConnection

protected HttpsURLConnection(URL httpsURL)
Method Detail

getCipherSuite

public abstract String getCipherSuite()
Returns:
returns cipher suite for the https connection

getLocalCertificates

public abstract Certificate[] getLocalCertificates()
Returns:
returns array of local certificates

getServerCertificates

public abstract Certificate[] getServerCertificates()
                                             throws SSLPeerUnverifiedException
Returns:
returns array of server certificates
Throws:
SSLPeerUnverifiedException

setDefaultHostnameVerifier

public static void setDefaultHostnameVerifier(HostnameVerifier verifier)
Parameters:
verifier - the default hostname verifier

getDefaultHostnameVerifier

public static HostnameVerifier getDefaultHostnameVerifier()
Returns:
returns the default hostname verifier

setHostnameVerifier

public void setHostnameVerifier(HostnameVerifier verifier)
Sets the hostname verifier

Parameters:
verifier - the hostname verifier

getHostnameVerifier

public HostnameVerifier getHostnameVerifier()
Returns:
returns the hostname verifier

setDefaultSSLSocketFactory

public static void setDefaultSSLSocketFactory(SSLSocketFactory aFactory)
Parameters:
aFactory - the default SSL socket factory to use

getDefaultSSLSocketFactory

public static SSLSocketFactory getDefaultSSLSocketFactory()
Returns:
returns the default SSL socket factory

setSSLSocketFactory

public void setSSLSocketFactory(SSLSocketFactory aFactory)
Parameters:
aFactory - the SSL socket factory used by this connection

getSSLSocketFactory

public SSLSocketFactory getSSLSocketFactory()
Returns:
returns the SSL socket factory in use

Final

Licensed Materials - Property of IBM
© Copyright IBM Corp. 2006, 2008 All Rights Reserved.