Examples of HandlerList


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, ROOT_PATH_INFO, staticResourceHandler("ui/html/", "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

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

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

  public Server build() {
    // build base server
    Server server = this.baseServerBuilder.build();

    // build each servlet to be published
    HandlerList servletHandlers = new HandlerList();
    for (ServletDefinition servletDefinition : this.servletDefinitions) {
      // create the servlet request handler
      ServletContextHandler servletHandler = createServletHandler(servletDefinition);
      // add security handler if security settings were specified
      if (servletDefinition.isRequireHttps()
          || servletDefinition.isRequireBasicAuth()) {
        ConstraintSecurityHandler securityHandler = createSecurityHandler(
            server, servletDefinition);
        servletHandler.setSecurityHandler(securityHandler);
      }
      servletHandlers.addHandler(servletHandler);
    }
    server.setHandler(servletHandlers);

    return server;
  }
View Full Code Here

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

        throws Exception
    {
        Server server = new Server( 0 );
        ResourceHandler handler = new ResourceHandler();
        handler.setResourceBase( getTestFile( "src/test/resources" ).getAbsolutePath() );
        HandlerList handlers = new HandlerList();
        handlers.setHandlers( new Handler[]{ handler, new DefaultHandler() } );
        server.setHandler( handlers );
        server.start();
        return server;
    }
View Full Code Here

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

    }
    catch(Exception e) {
      logger.info(methodName, null, e);
    }
    //
    HandlerList handlers = new HandlerList();
    DuccHandler duccHandler = new DuccHandler(this);
    DuccHandlerClassic duccHandlerClassic = new DuccHandlerClassic(this);
    DuccHandlerJsonFormat duccHandlerJson = new DuccHandlerJsonFormat(this);
    DuccHandlerProxy duccHandlerProxy = new DuccHandlerProxy();
    DuccHandlerUserAuthentication duccHandlerUserAuthentication = new DuccHandlerUserAuthentication();
    SessionHandler sessionHandler = new SessionHandler();
    handlers.setHandlers(new Handler[] { sessionHandler, duccHandlerUserAuthentication, duccHandlerJson, duccHandlerProxy, duccHandlerClassic, duccHandler, jspHandler, resourceHandler, new DefaultHandler() });
    server.setHandler(handlers);
    logger.trace(methodName, null, messages.fetch("exit"));
  }
View Full Code Here

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

      sh.setInitParameter("com.sun.jersey.api.json.POJOMappingFeature",
          "true");
      root.addServlet(sh, "/api/v1/*");
      sh.setInitOrder(2);

      HandlerList handlerList = new HandlerList();

      try {
        ViewRegistry viewRegistry = ViewRegistry.getInstance();
        for (ViewInstanceEntity entity : viewRegistry.readViewArchives(configs)){
          handlerList.addHandler(viewRegistry.getWebAppContext(entity));
        }
      } catch (SystemException e) {
        LOG.error("Caught exception deploying views.", e);
      }

      handlerList.addHandler(root);

      server.setHandler(handlerList);

      ServletHolder agent = new ServletHolder(ServletContainer.class);
      agent.setInitParameter("com.sun.jersey.config.property.resourceConfigClass",
View Full Code Here

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

   }

   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

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

      // Can't use /* here because of Guice and Jetty static content conflicts
      root.addFilter(GuiceFilter.class, "/status/*", null);
      root.addFilter(GuiceFilter.class, "/druid/*", null);

      HandlerList handlerList = new HandlerList();
      handlerList.setHandlers(new Handler[]{root});

      server.setHandler(handlerList);
    }
View Full Code Here

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

 
  public FileServer(int port, String basePath) {
    server = new Server(port);
        ResourceHandler resource_handler = new ResourceHandler();
        resource_handler.setResourceBase(basePath);       
        HandlerList handlers = new HandlerList();
        handlers.setHandlers(new Handler[] { resource_handler, new DefaultHandler() });
        server.setHandler(handlers);       
  }
View Full Code Here

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

        proxyPassword.set(auth.substring(colon + 1));
        request.setHandled(false);
      }
    };

    HandlerList handlerList = new HandlerList();
    handlerList.addHandler(proxyCountingHandler);
    handlerList.addHandler(proxyHandler);
    proxy.setHandler(handlerList);

    ServletHolder proxyHolder = proxyHandler.addServletWithMapping("org.eclipse.jetty.servlets.ProxyServlet", "/");
    proxyHolder.setAsyncSupported(true);
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.