hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Brown" <chris92...@hotmail.com>
Subject RE: Real-time feedback about upload progress
Date Wed, 17 Nov 2004 13:53:12 GMT
Actually, Swing provides a class "javax.swing.ProgressMonitorInputStream", 
but it doesn't provide enough of the sort of low-level control that would 
seem useful to myself (and I imagine to others).

It might prove satisfactory to Gaspar, and in my current situation I *can* 
use this filter input stream with the request entity, but I hope my 
suggestions will prove helpful.

- Chris

>From: "Chris Brown" <chris92250@hotmail.com>
>Reply-To: "HttpClient Project" <httpclient-dev@jakarta.apache.org>
>To: httpclient-dev@jakarta.apache.org
>Subject: Real-time feedback about upload progress
>Date: Wed, 17 Nov 2004 14:36:38 +0100
>Hi all,
>It's funny that I found myself helping out with real-time downloading 
>feedback... I'm implementing it right now using HttpClient 3.0-alpha.  BUT, 
>now I've stumbled across a problem...  The reverse, in fact!  I need to 
>provide feedback on UPLOADING!
>RequestEntity doesn't seem to provide me with any way to see how much of a 
>stream has been sent to the server.  In InputStreamRequestEntity, for 
>example, I can provide the input stream, and then execute the 
>Post/PutMethod... and have control again when it's all done.
>Am I right so far?  Is there no way to get feedback on how much data has 
>been sent?
>Assuming that you CAN'T get this feedback, I consider this an important 
>feature to add for the 3.0 release (I'm not sure I can contribute anything 
>more than an idea at the moment...).  Here's some ideas :
>* modify RequestEntity so that can add a "Listener"-style interface for 
>notifying some class each time one byte or a block of bytes has been 
>transferred, something like
>  RequestEntity::addRequestEntityMonitor(...)
>  interface RequestEntityMonitor
>  {
>    void bytesTransferred(int numberOfBytes);
>  }
>* create some sort of FilterInputStream that can wrap any other 
>InputStream, providing the above functionality.  This would be more 
>light-weight than the above approach (no overhead for those that don't need 
>this feature).
>Can you confirm if I'm correct, and maybe let me know what you think of my 
>suggestions (helpful comments only please!).
>- Chris
>MSN Hotmail : antivirus et antispam intégrés 
>To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org

MSN Messenger : dialoguez en temps réel avec vos amis ! 

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

View raw message