Hi, For your first question, I'm assuming that it's part of the server side request handler. You should look into subclassing org.apache.wink.server.handlers.HandlersFactory (http://hudson.zones.apache.org/hudson/view/Wink/job/Wink-Trunk-JDK1.5-Deploy/javadoc/) . Specify the name of the subclass as a property in the configuration properties file (http://cwiki.apache.org/WINK/51-registration-and-configuration.html)
For the second, you can try getting the matching resources by getting the UriInfo in the handler via context.getUriInfo()/context.getAttribute(UriInfo.class). Then calling some of the UriInfo.getMatchedResources() and other methods. Also, you could look at the org.apache.wink.server.internal.handlers.SearchResult. SearchResult is an internal class which means it may still be subject to change in future releases but if the information in SearchResult is more useful to you, please let us know and we can open a JIRA for improvement. On Wed, Nov 18, 2009 at 11:45 AM, Tsadok, Shay <[email protected]> wrote: > Hi, > > > > I would like to write my own User handler that will be part of the > “Request’s handlers”. > > > > Two questions: > > 1. What is the best way to integrate this kind of handler to the > “default request handlers chain”? > > 2. In this handler I need access to the requested resource (I’m going > to make some validation in my handler for some specific resources). Do you > know if I can have this information at the stage that my handler is invoked? > > > > Thanks in advance! > > Shay > >
