0

How can I find the target method/function name invoked by an URI in RESTFul webservices?

I have defined a filter which has before and after methods/functions, I want to find the target method/function which will be invoked by a certain URI to do some logic before the request is handled.

I am using Restlet Core - API and Engine.

s2s
  • 33
  • 1
  • 6
  • Do you want to know the URI and/or HTTP method or the Java method? If it's java method, what does that tell you that the other information doesn't? – JimmyJames Jan 21 '16 at 20:16
  • The Java method name, I have some configuration parameters in the application.properties file based on which I grant access to service. – s2s Jan 22 '16 at 09:02
  • Can you switch your configurations to be based of of the URI path? There may be a way to do what you are asking about but for sure you can get the path from the request. I can't think of why it wouldn't give you equivalent capabilities. – JimmyJames Jan 22 '16 at 14:00
  • The URI can contain query_param, making it dynamic. I do not have a static identity for URIs. – s2s Jan 23 '16 at 14:46
  • And the query parameter defines which Java method is called? In any event, this information is presumably stored somewhere in order to route the requests. Retrieving this doesn't appear to be part of the JAX-RS spec but perhaps restlet provides a proprietary solution. – JimmyJames Jan 25 '16 at 17:48

0 Answers0