Date: 2005-01-19T11:41:50
   Editor: RolandWeber
   Wiki: Jakarta-HttpClient Wiki
   Page: HttpClientApiRedesign
   URL: http://wiki.apache.org/jakarta-httpclient/HttpClientApiRedesign

   thoughts on how to cancel a request being handled asynchronously

Change Log:

------------------------------------------------------------------------------
@@ -187,6 +187,11 @@
    a. {{{ HttpAsyncLink }}} interface for sending requests asynchronously
    a. {{{ HttpAsyncCallback }}} interface
 
+ * representation for asynchronous requests in progress. Needed as identifier 
to cancel a specific execution. Suitable as key in a map. A base class can be 
derived for specific implementations of {{{ HttpAsyncLink }}}.
+
+   a. {{{ HttpAsyncHandle }}} interface
+   a. {{{ BasicAsyncHandle }}} class implementing {{{ HttpAsyncHandle }}}
+
  * result lookup interface for HTTP responses.
 
    a. {{{ HttpAsyncResult }}} interface for checking whether the response is 
available, and getting it
@@ -199,17 +204,21 @@
  * minimal implementation of the asynchronous execution interface.
 
    a. {{{ SimpleAsyncLink }}} class implementing {{{ HttpAsyncLink }}}
+   a. {{{ SimpleAsyncHandle }}} class extending {{{ BasicAsyncHandle }}} 
(maybe as an inner class)
 
  The minimal implementation spawns a new thread that sends the request over a 
connection and waits for a response. The callback interface is invoked by that 
thread. The connection is passed to the constructor. The minimal implementation 
handles at most one request at a time and therefore does not have to maintain a 
request queue. It can be used by applications that want to use a single 
connection asynchronously and handle synchronization themselves.
 
  * standard implementation of the asynchronous execution interface.
 
    a. {{{ StdAsyncLink }}} class implementing {{{ HttpAsyncLink }}}
+   a. {{{ StdAsyncHandle }}} class extending {{{ BasicAsyncHandle }}} (maybe 
as an inner class)
+
  The standard implementation spawns a new thread that alternately sends 
requests over a client connection and waits for a response. Unlike {{{ 
SimpleAsyncLink}}}, it maintains a queue of requests to be processed. It can be 
used by multiple threads simultaneously. It supports persistent use of a 
connection, but not pipelining. The constructor gets either a client 
connection, or a connection manager.
 
  * pipelining implementation of the asynchronous execution interface. See note 
on Pipelining below.
 
    a. {{{ PipeliningAsyncLink }}} class implementing {{{ HttpAsyncLink }}}
+   a. {{{ PipeliningAsyncHandle }}} class extending {{{ BasicAsyncHandle }}} 
(maybe as an inner class)
    a. {{{ PipeliningParams }}} class
    a. various helper classes to be used by {{{ PipeliningAsyncLink }}}
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to