On Sep 29, 2014, at 1:26 PM, Alessio Soldano <[email protected]> wrote:

> On 26/09/14 22:19, Daniel Kulp wrote:
>> The only real way for you do do this is grab the InputStream very early in 
>> the interceptor chain and wrapper it with an InputStream that would record 
>> the number of bytes read. Sometime before the invoke, grab that number from 
>> that stream in another interceptor.
> Just noticed, there's a 
> org.apache.cxf.management.interceptor.PersistInInterceptor in 
> cxf-rt-management that early consumes the input stream into a 
> CachedOutputStream, which is later used to store the message size in a 
> ExchangeData attached to the Message.

I saw these the other day while working on the Metrics things and almost 
deleted them.   From what I can tell, they aren’t used anywhere within CXF.  
They have no unit tests.   Thus, I have no idea if they work or anything.   


-- 
Daniel Kulp
[email protected] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Reply via email to