Package restx

Examples of restx.RestxHandler


            public Optional<RestxHandlerMatch> match(RestxRoute route) {
                // here we decide to apply the filter or not based on the route class.
                // but we could decide on any route property, for instance relying on the fact that routes generated
                // by @{GET,POST,PUT,DELETE} are always StdEntityRoute instances and their matcher always StdRouteMatcher
                if (route instanceof ExampleRoute) {
                    return Optional.of(new RestxHandlerMatch(new StdRestxRequestMatch("/route/filter"), new RestxHandler() {
                        @Override
                        public void handle(RestxRequestMatch match, RestxRequest req, RestxResponse resp, RestxContext ctx) throws IOException {
                            resp.getWriter().write(">>");
                            ctx.nextHandlerMatch().handle(req, resp, ctx);
                            resp.getWriter().write("<<");
View Full Code Here

TOP

Related Classes of restx.RestxHandler

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.