Package restx

Examples of restx.StdRestxRequestMatch


        Class<?> clazz = (Class<?>) stdEntityRoute.getEntityResponseType();

        for (ETagProvider<?> provider : providers) {
            if (provider.getEntityType().isAssignableFrom(clazz)) {
                return Optional.of(new RestxHandlerMatch(new StdRestxRequestMatch("/*"), new ETagHandler<>(provider)));
            }
        }

        return Optional.absent();
    }
View Full Code Here


        this.collector = collector;
    }

    @Override
    public Optional<RestxHandlerMatch> match(RestxRoute route) {
        return Optional.of(new RestxHandlerMatch(new StdRestxRequestMatch("/*"), this));
    }
View Full Code Here

            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

        Optional.<RestxPrincipal>absent(), Duration.ZERO);
  }

    @Override
    public Optional<RestxHandlerMatch> match(RestxRoute route) {
        return Optional.of(new RestxHandlerMatch(new StdRestxRequestMatch("/*"), this));
    }
View Full Code Here

TOP

Related Classes of restx.StdRestxRequestMatch

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.