Apache CXF API

org.apache.cxf.transport.http
Interface HttpURLConnectionFactory

All Known Implementing Classes:
HttpsURLConnectionFactory, HttpURLConnectionFactoryImpl

public interface HttpURLConnectionFactory

The primary purpose for this interface is to generate HttpURLConnections and retrieve information about the connections. This interface is also meant to be used as a lower denominator for HttpURLConnections and HttpsURLConnections.


Method Summary
 HttpURLConnection createConnection(Proxy proxy, URL url)
          Create an HttpURLConnection, proxified if neccessary.
 HttpURLConnectionInfo getConnectionInfo(HttpURLConnection connnection)
          This method returns Connection Info objects for the particular connection.
 String getProtocol()
           
 

Method Detail

createConnection

HttpURLConnection createConnection(Proxy proxy,
                                   URL url)
                                   throws IOException
Create an HttpURLConnection, proxified if neccessary.

Parameters:
proxy - The proxy. May be null if connection is not to be proxied.
url - The target URL
Returns:
An appropriate URLConnection
Throws:
IOException

getConnectionInfo

HttpURLConnectionInfo getConnectionInfo(HttpURLConnection connnection)
                                        throws IOException
This method returns Connection Info objects for the particular connection. The connection must be connected.

Parameters:
con - The connection that is the subject of the information object.
Returns:
The HttpURLConnection Info for the given connection.
Throws:
IOException

getProtocol

String getProtocol()
Returns:
the protocol that this connection supports (http or https)

Apache CXF API

Apache CXF