users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Intercepting after MBR reads the stream but before invoking ?

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Tue, 8 Oct 2013 12:46:52 +0100

Hi

Now and then we get the queries on how to get access not only to the
target class/method (ResourceInfo helps there) but to the parameter
instances, before the application code gets invoked, example for the
monitoring purposes.
ResourceInfo + UriInfo + accessing InputStream if any from the filters
can offer the way to access all of the values representing individual
target method parameters, but I wonder if we can offer something
simpler/cooler,

Any ideas ? what about introducing one extra stage, in addition to Pre
and Post matching, PreInvoking where we'd have a provider like
ResourceInfoFilter with the signature like this:

ResourceInfo getResourceInfo();

ResourceInfo will have a new method added too:

List<Object> getMehodParameterValues();

this will throw ISE unless invoked from ResourceInfoFilter ?

Sergey