Hi Greg

from RequestFilter you can get to a resource class instance like this :

classResourceInfo.getResourceProvider().getInstance();

and then getClass() on that instance, if needed

You can get the name of the operation like this :

OperationResourceInfo ori =  
message.getExchange().get(OperationResourceClass.class);
Method m = ori.getMethodToInvoke();

Give it a try please and let me know if you have any problems, unless Ian has 
convinced you Spring AOP is the way to go :-)
Cheers, Sergey


A custom request handler (RequestHandler extension) might do. You can get an access to an actual resource object which is about to be invoked upon, name of the operation, http method, etc...Let me now if you'd lke to get more details on how to retrieve the resource class instance...

Sergey,

That info would be great! I've spent some time poking around the Message/ClassResourceInfo objects but haven't found a good way to get the info I need.

Ideally I'd want:
1) class, function that would be called
2) Parameter values to be passed to the function

If (2) can't be retrieved directly, is there any way to build this info? My ultimate goal is to have a check function like:
check(Class clazz, Method m, Object... args)
Otherwise I was thinking I'd have to augment each API function directly with a check call.

Thanks,
-Greg

Reply via email to