hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HTTPCORE-11) Provide generic server and client connection primitives that can work with arbitrary HTTP data receivers and transmitters.
Date Sat, 09 Sep 2006 20:05:22 GMT
    [ http://issues.apache.org/jira/browse/HTTPCORE-11?page=comments#action_12433641 ] 
            
Oleg Kalnichevski commented on HTTPCORE-11:
-------------------------------------------

Roland,

The trouble is that #open() method in the HttpClientConnection interface implies a blocking
process of establishing a connection, which is not always the case

How about splitting the interface in two?

public interface HttpOutgoingConnection extends HttpConnection {

    boolean isResponseAvailable(int timeout) 
        throws IOException; 
    
    void sendRequestHeader(HttpRequest request) 
        throws HttpException, IOException;

    void sendRequestEntity(HttpEntityEnclosingRequest request) 
        throws HttpException, IOException;

    HttpResponse receiveResponseHeader(HttpParams params) 
        throws HttpException, IOException;

    void receiveResponseEntity(HttpResponse response) 
        throws HttpException, IOException;
    
    void flush() throws IOException;
    
}

public interface HttpClientConnection extends HttpOutgoingConnection {

    void open(HttpParams params);

}

This way HttpAsync can continue using the HttpClientConnection interface pretty much the same
way as before, whereas the NIO extensions can provide a custom interface extending HttpOutgoingConnection

Can you live with that?

Oleg

> Provide generic server and client connection primitives that can work with arbitrary
HTTP data receivers and transmitters.
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HTTPCORE-11
>                 URL: http://issues.apache.org/jira/browse/HTTPCORE-11
>             Project: HttpComponents Core
>          Issue Type: Improvement
>          Components: HttpCore
>    Affects Versions: 4.0-alpha2
>            Reporter: Oleg Kalnichevski
>         Assigned To: Oleg Kalnichevski
>             Fix For: 4.0-alpha3
>
>         Attachments: conn.patch, httpclientconn-2.patch, httpclientconn.patch, httpcore-abstractconn.patch
>
>
> Provide generic server and client connection primitives that can work with arbitrary
HTTP data receivers and transmitters. The default connection primitives in their present form
are tightly coupled with the java.net.Socket class. There are cases when the underlying I/O
transport is based on different media (MINA transport, NIO channels)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org


Mime
View raw message