Package io.undertow.server.handlers.resource

Examples of io.undertow.server.handlers.resource.ClassPathResourceManager


                                    });
                                    channel.resumeReceives();
                                }
                            }
                        }))
                        .addPrefixPath("/", resource(new ClassPathResourceManager(ChatServer.class.getClassLoader(), ChatServer.class.getPackage()))
                                .addWelcomeFiles("index.html")))
                .build();

        server.start();
    }
View Full Code Here


                                    }
                                });
                                channel.resumeReceives();
                            }
                        }))
                        .addPrefixPath("/", resource(new ClassPathResourceManager(WebSocketServer.class.getClassLoader(), WebSocketServer.class.getPackage())).addWelcomeFiles("index.html")))
                .build();
        server.start();
    }
View Full Code Here

                                        session.sendText(payload, null);
                                    }
                                });
                            }
                        }))
                        .addPath("index.html", resource(new ClassPathResourceManager(WebSocketServer.class.getClassLoader(), WebSocketServer.class.getPackage())))
                        .addPath("/", redirect("http://localhost:8080/index.html")))
                .build();
        server.start();
    }
View Full Code Here

                                        }
                                    }
                                });
                            }
                        }))
                        .addPath("index.html", resource(new ClassPathResourceManager(WebSocketServer.class.getClassLoader(), WebSocketServer.class.getPackage())))
                        .addPath("/", redirect("http://localhost:8080/index.html")))
                .build();
        server.start();
    }
View Full Code Here

        DeploymentInfo builder = new DeploymentInfo()
                .setClassLoader(JSRWebSocketServer.class.getClassLoader())
                .setContextPath("/")
                .addWelcomePage("index.html")
                .setResourceManager(new ClassPathResourceManager(JSRWebSocketServer.class.getClassLoader(), JSRWebSocketServer.class.getPackage()))
                .addServletContextAttribute(WebSocketDeploymentInfo.ATTRIBUTE_NAME,
                        new WebSocketDeploymentInfo()
                                .setBuffers(new ByteBufferSlicePool(100, 1000))
                                .addEndpoint(JsrChatWebSocketEndpoint.class)
                )
View Full Code Here

                                });
                                channel.resumeReceives();
                            }

                        }))
                        .addPrefixPath("/", resource(new ClassPathResourceManager(ChatServer.class.getClassLoader(), ChatServer.class.getPackage()))
                                .addWelcomeFiles("index.html")))
                .build();

        server.start();
    }
View Full Code Here

                        //we use a predicate handler here. If the path is index.html we serve the page
                        //otherwise we redirect to index.html
                        new PredicateHandler(
                                Predicates.path("/index.html"),
                                new ResourceHandler()
                                        .setResourceManager(new ClassPathResourceManager(WebSocketServer.class.getClassLoader(), WebSocketServer.class.getPackage())),
                                new RedirectHandler("http://localhost:8080/index.html")))
                .build();
        server.start();
    }
View Full Code Here

                        //we use a predicate handler here. If the path is index.html we serve the page
                        //otherwise we redirect to index.html
                        new PredicateHandler(
                                Predicates.path("/index.html"),
                                new ResourceHandler()
                                        .setResourceManager(new ClassPathResourceManager(ChatServer.class.getClassLoader(), ChatServer.class.getPackage())),
                                new RedirectHandler("http://localhost:8080/index.html")))
                .build();
        server.start();
    }
View Full Code Here

        servlet.addMapping("/perf-servlet/*");
        servlet.addInitParam(PerfAppServlet.BASE_URL_INIT_PARAM, "http://" + keycloakServer.getConfig().getHost() + ":" + keycloakServer.getConfig().getPort());

        deploymentInfo.addServlet(servlet);

        deploymentInfo.setResourceManager(new ClassPathResourceManager(getClass().getClassLoader()));

        keycloakServer.getServer().deploy(deploymentInfo);

        System.out.println("PerfApp deployed");
    }
View Full Code Here

                                    }
                                });
                                channel.resumeReceives();
                            }
                        }))
                        .addPrefixPath("/", resource(new ClassPathResourceManager(WebSocketServer.class.getClassLoader(), WebSocketServer.class.getPackage())).addWelcomeFiles("index.html")))
                .build();
        server.start();
    }
View Full Code Here

TOP

Related Classes of io.undertow.server.handlers.resource.ClassPathResourceManager

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.