Package com.jetdrone.vertx.yoke

Examples of com.jetdrone.vertx.yoke.Yoke.use()


            out.close();
            final String location = temp.getAbsolutePath();

            Yoke yoke = new Yoke(this);
            yoke.engine("mvel", new MVELEngine(""));
            yoke.use(new Middleware() {
                @Override
                public void handle(YokeRequest request, Handler<Object> next) {
                    request.put("name", "Paulo");
                    request.response().render(location, next);
                }
View Full Code Here


            out.close();
            final String location = temp.getAbsolutePath();

            Yoke yoke = new Yoke(this);
            yoke.engine("shtml", new com.jetdrone.vertx.yoke.engine.StringPlaceholderEngine(""));
            yoke.use(new Middleware() {
                @Override
                public void handle(@NotNull YokeRequest request, @NotNull Handler<Object> next) {
                    request.put("name", "Paulo");
                    request.response().render(location, next);
                }
View Full Code Here

                app.store(new MongoDBSessionStore(vertx.eventBus(), "vertx.mongopersistor", "sessions"));

                final Mac hmac = app.security().getMac("HmacSHA256");

                app.use(new BodyParser());
                app.use(new CookieParser(hmac));
                app.use(new Session(hmac));


                app.use(new Router() {{
View Full Code Here

                app.store(new MongoDBSessionStore(vertx.eventBus(), "vertx.mongopersistor", "sessions"));

                final Mac hmac = app.security().getMac("HmacSHA256");

                app.use(new BodyParser());
                app.use(new CookieParser(hmac));
                app.use(new Session(hmac));


                app.use(new Router() {{
                    get("/", new Handler<YokeRequest>() {
View Full Code Here

                final Mac hmac = app.security().getMac("HmacSHA256");

                app.use(new BodyParser());
                app.use(new CookieParser(hmac));
                app.use(new Session(hmac));


                app.use(new Router() {{
                    get("/", new Handler<YokeRequest>() {
                        @Override
View Full Code Here

                app.use(new BodyParser());
                app.use(new CookieParser(hmac));
                app.use(new Session(hmac));


                app.use(new Router() {{
                    get("/", new Handler<YokeRequest>() {
                        @Override
                        public void handle(YokeRequest request) {
                            JsonObject session = request.get("session");
                            if (session == null) {
View Full Code Here

        final Yoke yoke = new Yoke(this);
        // register jMustache render engine
        yoke.engine("shtml", new StringPlaceholderEngine("com/jetdrone/vertx/kitcms/views"));
        // log the requests
        yoke.use(new Logger());
        // install the pretty error handler middleware
        yoke.use(new ErrorHandler(true));
        // install the favicon middleware
        yoke.use(new Favicon());
        // install custom middleware to identify the domain
View Full Code Here

        // register jMustache render engine
        yoke.engine("shtml", new StringPlaceholderEngine("com/jetdrone/vertx/kitcms/views"));
        // log the requests
        yoke.use(new Logger());
        // install the pretty error handler middleware
        yoke.use(new ErrorHandler(true));
        // install the favicon middleware
        yoke.use(new Favicon());
        // install custom middleware to identify the domain
        yoke.use(new DomainMiddleware(config));
        // install the static file server
View Full Code Here

        // log the requests
        yoke.use(new Logger());
        // install the pretty error handler middleware
        yoke.use(new ErrorHandler(true));
        // install the favicon middleware
        yoke.use(new Favicon());
        // install custom middleware to identify the domain
        yoke.use(new DomainMiddleware(config));
        // install the static file server
        // note that since we are mounting under /static the root for the static middleware
        // will always be prefixed with /static
View Full Code Here

        // install the pretty error handler middleware
        yoke.use(new ErrorHandler(true));
        // install the favicon middleware
        yoke.use(new Favicon());
        // install custom middleware to identify the domain
        yoke.use(new DomainMiddleware(config));
        // install the static file server
        // note that since we are mounting under /static the root for the static middleware
        // will always be prefixed with /static
        yoke.use("/static", new Static("."));
        // install the BasicAuth middleware
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.