Examples of ContextHandlerCollection


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

        return camelServlet;
    }
   
    protected Server createServer() throws Exception {
        Server server = new Server();
        ContextHandlerCollection collection = new ContextHandlerCollection();
        server.setHandler(collection);

        // configure thread pool if min/max given
        if (minThreads != null || maxThreads != null) {
            if (getThreadPool() != null) {
View Full Code Here

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

        return camelServlet;
    }
   
    protected Server createServer() throws Exception {
        Server server = new Server();
        ContextHandlerCollection collection = new ContextHandlerCollection();
        server.setHandler(collection);

        // configure thread pool if min/max given
        if (minThreads != null || maxThreads != null) {
            if (getThreadPool() != null) {
View Full Code Here

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

        return camelServlet;
    }
   
    protected Server createServer() throws Exception {
        Server server = new Server();
        ContextHandlerCollection collection = new ContextHandlerCollection();
        server.setHandler(collection);

        // configure thread pool if min/max given
        if (minThreads != null || maxThreads != null) {
            if (getThreadPool() != null) {
View Full Code Here

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

  // Setup/teardown
 
  public void start()
    throws Exception
  {
    ContextHandlerCollection contexts = new ContextHandlerCollection();
    if (webapps)
    {
      // Start jetty
      server = new Server( testPort );   
      server.setStopAtShutdown( true );
      // Initialize the servlets
      server.setHandler(contexts);
    }

    if (singleWar)
    {
      if (webapps)
      {
        // Start the single combined war
        String combinedWarPath = "../../framework/build/war-proprietary/mcf-combined-service.war";
        if (System.getProperty("combinedWarPath") != null)
          combinedWarPath = System.getProperty("combinedWarPath");
       
        // Initialize the servlet
        WebAppContext lcfCombined = new WebAppContext(combinedWarPath,"/mcf");
        // This will cause jetty to ignore all of the framework and jdbc jars in the war, which is what we want.
        lcfCombined.setParentLoaderPriority(true);
        contexts.addHandler(lcfCombined);
        server.start();
      }
      else
        throw new Exception("Can't run singleWar without webapps");
    }
    else
    {
      if (webapps)
      {
        String crawlerWarPath = "../../framework/build/war-proprietary/mcf-crawler-ui.war";
        String authorityserviceWarPath = "../../framework/build/war-proprietary/mcf-authority-service.war";
        String apiWarPath = "../../framework/build/war-proprietary/mcf-api-service.war";

        if (System.getProperty("crawlerWarPath") != null)
            crawlerWarPath = System.getProperty("crawlerWarPath");
        if (System.getProperty("authorityserviceWarPath") != null)
            authorityserviceWarPath = System.getProperty("authorityserviceWarPath");
        if (System.getProperty("apiWarPath") != null)
            apiWarPath = System.getProperty("apiWarPath");

        // Initialize the servlets
        WebAppContext lcfCrawlerUI = new WebAppContext(crawlerWarPath,"/mcf-crawler-ui");
        // This will cause jetty to ignore all of the framework and jdbc jars in the war, which is what we want.
        lcfCrawlerUI.setParentLoaderPriority(true);
        contexts.addHandler(lcfCrawlerUI);
        WebAppContext lcfAuthorityService = new WebAppContext(authorityserviceWarPath,"/mcf-authority-service");
        // This will cause jetty to ignore all of the framework and jdbc jars in the war, which is what we want.
        lcfAuthorityService.setParentLoaderPriority(true);
        contexts.addHandler(lcfAuthorityService);
        WebAppContext lcfApi = new WebAppContext(apiWarPath,"/mcf-api-service");
        lcfApi.setParentLoaderPriority(true);
        contexts.addHandler(lcfApi);
        server.start();
      }

      // If all worked, then we can start the daemon.
      // Clear the agents shutdown signal.
View Full Code Here

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

   
    Server server;
   
    public MockMCFAuthorityService() {
      server = new Server(8345);
      ContextHandlerCollection contexts = new ContextHandlerCollection();
      server.setHandler(contexts);

      ServletContextHandler asContext = new ServletContextHandler(contexts,"/mcf-authority-service",ServletContextHandler.SESSIONS);
      asContext.addServlet(new ServletHolder(new UserACLServlet()), "/UserACLs");
      contexts.addHandler(asContext);
    }
View Full Code Here

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

   
    Server server;
   
    public MockMCFAuthorityService() {
      server = new Server(8346);
      ContextHandlerCollection contexts = new ContextHandlerCollection();
      server.setHandler(contexts);

      ServletContextHandler asContext = new ServletContextHandler(contexts,"/mcf-as",ServletContextHandler.SESSIONS);
      asContext.addServlet(new ServletHolder(new UserACLServlet()), "/UserACLs");
      contexts.addHandler(asContext);
    }
View Full Code Here

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

   
    Server server;
   
    public MockMCFAuthorityService() {
      server = new Server(8347);
      ContextHandlerCollection contexts = new ContextHandlerCollection();
      server.setHandler(contexts);

      ServletContextHandler asContext = new ServletContextHandler(contexts,"/mcf-as",ServletContextHandler.SESSIONS);
      asContext.addServlet(new ServletHolder(new UserACLServlet()), "/UserACLs");
      contexts.addHandler(asContext);
    }
View Full Code Here

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

        return camelServlet;
    }
   
    protected Server createServer() throws Exception {
        Server server = new Server();
        ContextHandlerCollection collection = new ContextHandlerCollection();
        server.setHandler(collection);

        // configure thread pool if min/max given
        if (minThreads != null || maxThreads != null) {
            if (getThreadPool() != null) {
View Full Code Here

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

        WebAppProvider wap = new WebAppProvider();
        wap.setMonitoredDirName(path);
        wap.setExtractWars(true);

        DeploymentManager dm = new DeploymentManager();
        dm.setContexts(new ContextHandlerCollection());
        dm.addAppProvider(wap);

        server.setHandler(dm.getContexts());
        server.addBean(dm);
    }
View Full Code Here

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

                            handlerCollection.addHandler(h);
                        }
                    }
                }
            }
            contexts = new ContextHandlerCollection();
            /*
             * handlerCollection may be null here if is only one handler to deal with.
             * Which in turn implies that there can't be a 'defaultHander' to deal with.
             */
            if (handlerCollection != null) {
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.