On Wed, Jul 27, 2005 at 02:33:16PM +0200, Tony Seebregts wrote:
> Hi Mike,
> 
> Thanks ... was just hoping I guess :-)
> 
> We have a requirement that the application using HttpClient be aware of 
> when a connection is being connected or reused (mostly for informing the 
> user). I can see how to make the necessary changes in HttpClient - but 
> don't particularly want to use a modified library unless it would be 
> incorporated in future releases.
> 
> Has the issue of connection event notifications ever been 
> raised/discussed and discarded ?
> 

This feature is planned for inclusion in the next major release of
HttpClient (4.0):

http://issues.apache.org/bugzilla/show_bug.cgi?id=10815

Meanwhile, one can implement the required functionality by extending one
of the existing HttpConnectionManager classes. Basically all it appears
to take is a listener (list of listeners) and an aidditional test in
the HttpConnectionManager#getConnectionWithTimeout method:

HttpConnection  conn = super.getConnectionWithTimeout(...);
boolean persistent = conn.isOpen();
callListeners(persistent);

Or something along this line

Oleg


> regards
> 
> Tony
> 
> 
> 
> Michael Becke wrote:
> 
> >Hi Tony,
> >
> >Before a method executes it is not associated with a connection, so
> >there would be nothing to test.  Generally speaking all connection
> >handling is done automatically by HttpClient.  You should never
> >actually seen an instance of HttpConnection.
> >
> >Mike
> >
> > 
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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

Reply via email to