Package org.restlet.routing

Examples of org.restlet.routing.Extractor$ExtractInfo


        // While routing requests to the redirector, extract the "kwd" query
        // parameter. For instance :
        // http://localhost:8111/search?kwd=myKeyword1+myKeyword2
        // will be routed to
        // http://www.google.com/search?q=site:mysite.org+myKeyword1%20myKeyword2
        Extractor extractor = new Extractor(getContext(), redirector);
        extractor.extractFromQuery("keywords", "kwd", true);

        // Attach the extractor to the router
        router.attach("/search", extractor);

        // Return the root router
View Full Code Here


                     match = match.substring(0,pos);
                     LOG.fine("redirect extraction, match="+match+", expr="+expr);
                  }
               }
               if (extraction!=null) {
                  Extractor extractor = new Extractor(parentContext,restlet);
                  for (int i=0; i<extraction.length; i++) {
                     extractor.extractFromQuery(extraction[i], extraction[i], true);
                  }
                  router.attach(match,extractor);
               } else {
                  router.attach(match,restlet);
               }
View Full Code Here

TOP

Related Classes of org.restlet.routing.Extractor$ExtractInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.