Package org.eclipse.jetty.server.handler

Examples of org.eclipse.jetty.server.handler.HandlerList


   }

   private HandlerList constructHandlers() {

      final JettyContext jettyContext = new JettyContext(currentHost, currentStubsPort, currentStubsSslPort, currentAdminPort);
      final HandlerList handlers = new HandlerList();
      handlers.setHandlers(new Handler[]
            {
                  constructHandler(STUBS_CONNECTOR_NAME, "/", staticResourceHandler("ui/html/templates/", "default404.html")),
                  constructHandler(STUBS_CONNECTOR_NAME, "/", staticResourceHandler("ui/images/", "favicon.ico")),
                  constructHandler(STUBS_CONNECTOR_NAME, "/", new StubsHandler(dataStore)),
View Full Code Here


   }

   private HandlerList constructHandlers() {

      final JettyContext jettyContext = new JettyContext(currentHost, currentStubsPort, currentStubsSslPort, currentAdminPort);
      final HandlerList handlers = new HandlerList();
      handlers.setHandlers(new Handler[]
            {
                  constructHandler(STUBS_CONNECTOR_NAME, "/", staticResourceHandler("ui/html/templates/", "default404.html")),
                  constructHandler(STUBS_CONNECTOR_NAME, "/", staticResourceHandler("ui/images/", "favicon.ico")),
                  constructHandler(STUBS_CONNECTOR_NAME, "/", new StubsHandler(dataStore)),
View Full Code Here

   }

   private HandlerList constructHandlers() {

      final JettyContext jettyContext = new JettyContext(currentHost, currentStubsPort, currentStubsSslPort, currentAdminPort);
      final HandlerList handlers = new HandlerList();
      handlers.setHandlers(new Handler[]
         {
            constructHandler(STUBS_CONNECTOR_NAME, "/", staticResourceHandler("ui/html/templates/", "default404.html")),
            constructHandler(STUBS_CONNECTOR_NAME, "/", staticResourceHandler("ui/images/", "favicon.ico")),
            constructHandler(STUBS_CONNECTOR_NAME, "/", new StubsHandler(dataStore)),
View Full Code Here

   }

   private HandlerList constructHandlers() {

      final JettyContext jettyContext = new JettyContext(currentHost, isSsl, currentStubsPort, currentAdminPort);
      final HandlerList handlers = new HandlerList();
      handlers.setHandlers(new Handler[]
            {
                  constructHandler(STUBS_CONNECTOR_NAME, "/", new StubsHandler(dataStore)),
                  constructHandler(SSL_CONNECTOR_NAME, "/", new SslHandler(dataStore)),
                  constructHandler(SPDY_CONNECTOR_NAME, "/", new SpdyHandler(dataStore)),
View Full Code Here

   }

   private HandlerList constructHandlers() {

      final JettyContext jettyContext = new JettyContext(currentHost, currentStubsPort, currentStubsSslPort, currentAdminPort);
      final HandlerList handlers = new HandlerList();
      handlers.setHandlers(new Handler[]
            {
                  constructHandler(STUBS_CONNECTOR_NAME, "/", staticResourceHandler("ui/html/templates/", "default404.html")),
                  constructHandler(STUBS_CONNECTOR_NAME, "/", staticResourceHandler("ui/images/", "favicon.ico")),
                  constructHandler(STUBS_CONNECTOR_NAME, "/", new StubsHandler(dataStore)),
View Full Code Here

   }

   private HandlerList constructHandlers() {

      final JettyContext jettyContext = new JettyContext(currentHost, currentStubsPort, currentStubsSslPort, currentAdminPort);
      final HandlerList handlers = new HandlerList();
      handlers.setHandlers(new Handler[]
         {
            constructHandler(STUBS_CONNECTOR_NAME, ROOT_PATH_INFO, staticResourceHandler("ui/html/templates/", "default404.html")),
            constructHandler(STUBS_CONNECTOR_NAME, ROOT_PATH_INFO, staticResourceHandler("ui/images/", "favicon.ico")),
            constructHandler(STUBS_CONNECTOR_NAME, ROOT_PATH_INFO, new StubsHandler(stubbedDataManager)),
View Full Code Here

    ResourceHandler resourceHandler = new ResourceHandler();
    resourceHandler.setDirectoriesListed(false);
    resourceHandler.setResourceBase(webDir.getAbsolutePath());

    // ----- add the handlers to the list handler -----
    HandlerList handlers = new HandlerList();
    handlers.addHandler(servletContext);
    handlers.addHandler(resourceHandler);

    // ----- create the login module with http authentication -----

    File af = null;
    String authFile = nepheleConfig.getString(ConfigConstants.JOB_MANAGER_WEB_ACCESS_FILE_KEY, null);
View Full Code Here

        port2 = findFreePort();

        server = newJettyHttpServer(port1);
        addHttpConnector(server, port2);

        HandlerList list = new HandlerList();
        list.addHandler(new AbstractHandler() {
            @Override
            public void handle(String s, Request request, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws IOException, ServletException {
                if (request.getLocalPort() == port2) {
                    httpServletResponse.sendRedirect(getTargetUrl());
                }
            }
        });
        list.addHandler(getWebSocketHandler());
        server.setHandler(list);

        server.start();
        logger.info("Local HTTP server started successfully");
    }
View Full Code Here

    private Greenhouse createGrowBoxModel() {
        return App.createGrowBox(App.isRaspberry());
    }

    private HandlerList createHandlers() throws MalformedURLException {
        HandlerList handlers = new HandlerList();
        box = createGrowBoxModel();
        handlers.setHandlers(new Handler[]{
            createMainResHandler(), createCameraImagesHandler(), new GreenhouseControlsHandler(box),
            new ConfigurationHandler(box)
        });
        return handlers;
    }
View Full Code Here

   }

   private HandlerList constructHandlers() {

      final JettyContext jettyContext = new JettyContext(currentHost, isSsl, currentStubsPort, currentAdminPort);
      final HandlerList handlers = new HandlerList();
      handlers.setHandlers(new Handler[]
            {
                  constructHandler(STUBS_CONNECTOR_NAME, "/", new StubsHandler(dataStore)),
                  constructHandler(SSL_CONNECTOR_NAME, "/", new SslHandler(dataStore)),

                  constructHandler(ADMIN_CONNECTOR_NAME, "/stubdata/new", new StubsRegistrationHandler(dataStore, yamlParser)),
View Full Code Here

TOP

Related Classes of org.eclipse.jetty.server.handler.HandlerList

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.