Hey Jerome,

Thanks for your response.  This is the way I would have liked to solve this
problem (I also like the CountFilter idea), but unfortunately I need a
little bit more accurate information.  I did a simple test with a Directory
and transferred some files, and I notice the log is written before a
transfer completes.  This means that if a transfer doesn't complete for some
reason (like the client stops the transfer), the bytes sent is the same as
if the transfer completed.  Unfortunately I need be able to track the exact
amount of bytes transfered... thoughts?

Best Regards,
Jeff

On 4/10/07, Jerome Louvel <[EMAIL PROTECTED]> wrote:

Hi Jeff,

The approach I'm using is to rely on the access log information. The
default format record the bytes returned. You could customize your log
format to add the bytes received too. Then, you can use a tool such as
http://www.analog.cx/ to generate reports.

Another approach would be to plug a CountFilter between your VirtualHost
and your Application. This requires to be in standalone mode. This
filter could override the beforeHandle() and afterHandle() methods and
record the size of input and output entities to a persistent storage
(file, db).

Best regards,
Jerome


Jeff Walter wrote :
> Hey All,
>
> I'd like to be able to track the exact amount of bytes transfered to and
> from my Restlet Application, but I am not quite sure what would be the
> best approach for this.  I was thinking about using AOP to implement the
> tracking, but was wondering if anyone had done anything similar and
> could provide any insight/tips/suggestions.
>
> Thanks!
>
> Jeff

Reply via email to