BEA Systems, Inc.

WebLogic Server 8.1 API Reference

weblogic.net.http
Class HttpsURLConnection

java.lang.Object
  |
  +--java.net.URLConnection
        |
        +--java.net.HttpURLConnection
              |
              +--weblogic.net.http.HttpURLConnection
                    |
                    +--weblogic.net.http.HttpsURLConnection

public final class HttpsURLConnection
extends HttpURLConnection

A class to represent an HTTPS connection to a remote object.

Author:
Copyright © 2002 BEA Systems, Inc. All Rights Reserved.

Fields inherited from class weblogic.net.http.HttpURLConnection
clenOS, debug, http, inputStream, poster, ps, requests, responses, setRequests, timeout, userAgent
 
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
HttpsURLConnection(java.net.URL u)
           
HttpsURLConnection(java.net.URL u, weblogic.security.SSL.SSLClientInfo sslI)
           
 
Method Summary
 void connect()
          Make SSL connetion to URL which received in constructor.
 void disconnect()
           
 java.lang.String getCipherSuite()
          Returns the cipher suite that was negotiatd for the SSL connection.
static HostnameVerifier getDefaultHostnameVerifier()
          Deprecated. Deprecated in WebLogic Server 7.0. Replaced by the getDefaultHostnameVerifierJSSE() method.
static HostnameVerifierJSSE getDefaultHostnameVerifierJSSE()
          Gets the default HostnameVerifierJSSE inherited when an instance of this class is created.
static SSLSocketFactory getDefaultSSLSocketFactory()
          Gets the default static SSL socket factory to be used when creating sockets for secure https URL connections.
 HostnameVerifier getHostnameVerifier()
          Deprecated. Deprecated in WebLogic Server 7.0. Replaced by the getHostnameVerifierJSSE() method.
 HostnameVerifierJSSE getHostnameVerifierJSSE()
          Gets the HostnameVerifierJSSE.
protected  weblogic.net.http.HttpClient getHttpClient()
           
protected  java.lang.String getProtocol()
           
 javax.security.cert.X509Certificate[] getServerCertificateChain()
          Returns the certificate chain that was received from the server during the SSL handshake.
 javax.net.ssl.SSLSession getSSLSession()
          Returns the SSL session for the connection.
 SSLSocketFactory getSSLSocketFactory()
          Gets the SSL socket factory to be used when creating sockets for secure https URL connections.
 void loadLocalIdentity(java.security.cert.Certificate[] certs, java.security.PrivateKey privateKey)
          Load local identity cert chain and private key for client
 void loadLocalIdentity(java.io.InputStream[] stream)
          Load local identity key and certs for client.
 void loadLocalIdentity(java.io.InputStream certStream, java.io.InputStream keyStream, char[] password)
          Load local identity cert chain and private key for client
 void setHostnameVerifier(HostnameVerifier hv)
          Deprecated. Deprecated in WebLogic Server 7.0. Replaced by the setHostnameVerifierJSSE() method.
 void setHostnameVerifierJSSE(HostnameVerifierJSSE hv)
          Sets the HostnameVerifierJSSE for this instance of this class.
 void setSSLClientCertificate(java.io.InputStream[] certs)
          Load local identity key and certs for client.
 void setSSLSocketFactory(SSLSocketFactory sslSF)
          Sets the SSL socket factory to be used when creating sockets for secure https URL connections.
 
Methods inherited from class weblogic.net.http.HttpURLConnection
doSetRequests, followRedirect, getAuthInfo, getHeaderField, getHeaderField, getHeaderFieldKey, getInputStream, getOutputStream, getProxyAuthString, getRequestProperty, getResponseCode, getTimeout, setRequestProperty, setTimeout, usingProxy, writeRequests
 
Methods inherited from class java.net.HttpURLConnection
getErrorStream, getFollowRedirects, getHeaderFieldDate, getInstanceFollowRedirects, getPermission, getRequestMethod, getResponseMessage, setFollowRedirects, setInstanceFollowRedirects, setRequestMethod
 
Methods inherited from class java.net.URLConnection
addRequestProperty, getAllowUserInteraction, getContent, getContent, getContentEncoding, getContentLength, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderFieldInt, getHeaderFields, getIfModifiedSince, getLastModified, getRequestProperties, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setUseCaches, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HttpsURLConnection

public HttpsURLConnection(java.net.URL u,
                          weblogic.security.SSL.SSLClientInfo sslI)

HttpsURLConnection

public HttpsURLConnection(java.net.URL u)
Method Detail

loadLocalIdentity

public void loadLocalIdentity(java.io.InputStream[] stream)
Load local identity key and certs for client.

loadLocalIdentity

public void loadLocalIdentity(java.io.InputStream certStream,
                              java.io.InputStream keyStream,
                              char[] password)
Load local identity cert chain and private key for client

loadLocalIdentity

public void loadLocalIdentity(java.security.cert.Certificate[] certs,
                              java.security.PrivateKey privateKey)
Load local identity cert chain and private key for client

setSSLClientCertificate

public void setSSLClientCertificate(java.io.InputStream[] certs)
Load local identity key and certs for client.

setHostnameVerifier

public void setHostnameVerifier(HostnameVerifier hv)
Deprecated. Deprecated in WebLogic Server 7.0. Replaced by the setHostnameVerifierJSSE() method.
Sets the HostnameVerifier for this instance of this class.

getHostnameVerifier

public HostnameVerifier getHostnameVerifier()
Deprecated. Deprecated in WebLogic Server 7.0. Replaced by the getHostnameVerifierJSSE() method.
Gets the HostnameVerifier.

getDefaultHostnameVerifier

public static HostnameVerifier getDefaultHostnameVerifier()
Deprecated. Deprecated in WebLogic Server 7.0. Replaced by the getDefaultHostnameVerifierJSSE() method.
Gets the default HostnameVerifier inherited when an instance of this class is created. The default hostname verifier does a string comparison of the server's hostname with the server's certificate SubjectDN CommonName.

setHostnameVerifierJSSE

public void setHostnameVerifierJSSE(HostnameVerifierJSSE hv)
Sets the HostnameVerifierJSSE for this instance of this class.

getHostnameVerifierJSSE

public HostnameVerifierJSSE getHostnameVerifierJSSE()
Gets the HostnameVerifierJSSE.

getDefaultHostnameVerifierJSSE

public static HostnameVerifierJSSE getDefaultHostnameVerifierJSSE()
Gets the default HostnameVerifierJSSE inherited when an instance of this class is created. The default hostname verifier does a string comparison of the server's hostname with the server's certificate SubjectDN CommonName.

setSSLSocketFactory

public void setSSLSocketFactory(SSLSocketFactory sslSF)
Sets the SSL socket factory to be used when creating sockets for secure https URL connections.

getSSLSocketFactory

public SSLSocketFactory getSSLSocketFactory()
Gets the SSL socket factory to be used when creating sockets for secure https URL connections.

getDefaultSSLSocketFactory

public static SSLSocketFactory getDefaultSSLSocketFactory()
Gets the default static SSL socket factory to be used when creating sockets for secure https URL connections.

getCipherSuite

public java.lang.String getCipherSuite()
Returns the cipher suite that was negotiatd for the SSL connection.

getServerCertificateChain

public javax.security.cert.X509Certificate[] getServerCertificateChain()
                                                                throws javax.net.ssl.SSLPeerUnverifiedException
Returns the certificate chain that was received from the server during the SSL handshake.

getSSLSession

public javax.net.ssl.SSLSession getSSLSession()
Returns the SSL session for the connection.

connect

public void connect()
             throws java.io.IOException
Make SSL connetion to URL which received in constructor.

Overrides:
connect in class HttpURLConnection

disconnect

public void disconnect()

Overrides:
disconnect in class HttpURLConnection

getProtocol

protected java.lang.String getProtocol()

Overrides:
getProtocol in class HttpURLConnection

getHttpClient

protected weblogic.net.http.HttpClient getHttpClient()
                            throws java.io.IOException

Overrides:
getHttpClient in class HttpURLConnection

Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs81b