Apache CXF API

org.apache.cxf.transport.https
Class HttpsURLConnectionFactory

java.lang.Object
  extended by org.apache.cxf.transport.https.HttpsURLConnectionFactory
All Implemented Interfaces:
HttpURLConnectionFactory

public final class HttpsURLConnectionFactory
extends java.lang.Object
implements HttpURLConnectionFactory

This HttpsURLConnectionFactory implements the HttpURLConnectionFactory for using the given SSL Policy to configure TLS connections for "https:" URLs.


Field Summary
static java.lang.String HTTPS_URL_PROTOCOL_ID
          This constant holds the URL Protocol Identifier for HTTPS
 
Constructor Summary
HttpsURLConnectionFactory(TLSClientParameters params)
          This constructor initialized the factory with the configured TLS Client Parameters for the HTTPConduit for which this factory is used.
 
Method Summary
protected  void addLogHandler(java.util.logging.Handler handler)
           
 java.net.HttpURLConnection createConnection(java.net.Proxy proxy, java.net.URL url)
          Create a HttpURLConnection, proxified if necessary.
protected  void decorateWithTLS(javax.net.ssl.HttpsURLConnection connection)
          This method assigns the various TLS parameters on the HttpsURLConnection from the TLS Client Parameters.
 HttpURLConnectionInfo getConnectionInfo(java.net.HttpURLConnection connection)
          This operation returns an HttpsURLConnectionInfo for the given HttpsURLConnection.
protected  java.lang.String[] getDerivative()
           
protected  java.lang.String[] getUnSupported()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HTTPS_URL_PROTOCOL_ID

public static final java.lang.String HTTPS_URL_PROTOCOL_ID
This constant holds the URL Protocol Identifier for HTTPS

See Also:
Constant Field Values
Constructor Detail

HttpsURLConnectionFactory

public HttpsURLConnectionFactory(TLSClientParameters params)
This constructor initialized the factory with the configured TLS Client Parameters for the HTTPConduit for which this factory is used.

Parameters:
params - The TLS Client Parameters. This parameter is guaranteed to be non-null.
Method Detail

createConnection

public java.net.HttpURLConnection createConnection(java.net.Proxy proxy,
                                                   java.net.URL url)
                                            throws java.io.IOException
Create a HttpURLConnection, proxified if necessary.

Specified by:
createConnection in interface HttpURLConnectionFactory
Parameters:
proxy - This parameter is non-null if connection should be proxied.
url - The target URL. This parameter must be an https url.
Returns:
The HttpsURLConnection for the given URL.
Throws:
java.io.IOException - This exception is thrown if the "url" is not "https" or other IOException is thrown.

decorateWithTLS

protected void decorateWithTLS(javax.net.ssl.HttpsURLConnection connection)
                        throws java.security.NoSuchAlgorithmException,
                               java.security.NoSuchProviderException,
                               java.security.KeyManagementException
This method assigns the various TLS parameters on the HttpsURLConnection from the TLS Client Parameters.

Throws:
java.security.NoSuchAlgorithmException
java.security.NoSuchProviderException
java.security.KeyManagementException

addLogHandler

protected void addLogHandler(java.util.logging.Handler handler)

getUnSupported

protected java.lang.String[] getUnSupported()

getDerivative

protected java.lang.String[] getDerivative()

getConnectionInfo

public HttpURLConnectionInfo getConnectionInfo(java.net.HttpURLConnection connection)
                                        throws java.io.IOException
This operation returns an HttpsURLConnectionInfo for the given HttpsURLConnection.

Specified by:
getConnectionInfo in interface HttpURLConnectionFactory
Parameters:
connection - The HttpsURLConnection
Returns:
The HttpsURLConnectionInfo object for the given HttpsURLConnection.
Throws:
java.io.IOException - Normal IO Exceptions.
java.lang.ClassCastException - If "connection" is not an HttpsURLConnection.

Apache CXF API

Apache CXF