Package io.undertow.server.handlers.resource

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


                .setDefaultHandler(
                        //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


                .setDefaultHandler(
                        //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

     *
     * @param resourceManager The resource manager to use
     * @return A new resource handler
     */
    public static ResourceHandler resource(final ResourceManager resourceManager) {
        return new ResourceHandler(resourceManager).setDirectoryListingEnabled(false);
    }
View Full Code Here

     *
     * @param resourceManager The resource manager to use
     * @return A new resource handler
     */
    public static ResourceHandler resource(final ResourceManager resourceManager) {
        return new ResourceHandler().setResourceManager(resourceManager).setDirectoryListingEnabled(false);
    }
View Full Code Here

     *
     * @param resourceManager The resource manager to use
     * @return A new resource handler
     */
    public static ResourceHandler resource(final ResourceManager resourceManager) {
        return new ResourceHandler().setResourceManager(resourceManager).setDirectoryListingEnabled(false);
    }
View Full Code Here

TOP

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

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.