org.jcoderz.commons.connector.http
Interface HttpConnectionFactory

All Known Implementing Classes:
HttpConnectionFactoryImpl

public interface HttpConnectionFactory

Connection factory to obtain http connection handle for a specific connection request.


Method Summary
 HttpConnection getConnection(HttpConnectionSpec connectionSpec)
          Get a connection handle for an HTTP connection using request-specific properties.
 

Method Detail

getConnection

HttpConnection getConnection(HttpConnectionSpec connectionSpec)
                             throws ResourceException
Get a connection handle for an HTTP connection using request-specific properties.

Example:
 HttpConnectionFactory mConnectionFactory = ...;
 HttpConnectionSpec cs = new HttpConnectionSpec(this);
 cs.setUrl("http://host.somewhere.com/");
 
 HttpConnection connection = mConnectionFactory.getConnection(cs);
 
 

Parameters:
connectionSpec - HttpConnectionSpec instance holding request-specific properties.
Returns:
HttpConnection handle.
Throws:
ResourceException - indicating an error condition on application server side.


Copyright 2007 The jCoderZ Project.