Package org.eclipse.jetty.server.handler

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


  {
    server = new Server( port );   
    server.setStopAtShutdown( true );
   
    // Initialize the servlets
    ContextHandlerCollection contexts = new ContextHandlerCollection();
    server.setHandler(contexts);
    WebAppContext lcfCrawlerUI = new WebAppContext(crawlerWarPath,"/mcf-crawler-ui");
    // This can cause jetty to ignore all of the framework and jdbc jars in the war, which is what we
    // want in the single-process case.
    lcfCrawlerUI.setParentLoaderPriority(useParentLoader);
    contexts.addHandler(lcfCrawlerUI);
    WebAppContext lcfAuthorityService = new WebAppContext(authorityServiceWarPath,"/mcf-authority-service");
    // This can cause jetty to ignore all of the framework and jdbc jars in the war, which is what we
    // want in the single-process case.
    lcfAuthorityService.setParentLoaderPriority(useParentLoader);
    contexts.addHandler(lcfAuthorityService);
    WebAppContext lcfApi = new WebAppContext(apiWarPath,"/mcf-api-service");
    // This can cause jetty to ignore all of the framework and jdbc jars in the war, which is what we
    // want in the single-process case.
    lcfApi.setParentLoaderPriority(useParentLoader);
    contexts.addHandler(lcfApi);
  }
View Full Code Here


  {
    // Start jetty
    server = new Server( testPort );   
    server.setStopAtShutdown( true );
    // Initialize the servlets
    ContextHandlerCollection contexts = new ContextHandlerCollection();
    server.setHandler(contexts);

    if (singleWar)
    {
      // 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
    {
      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.
      IThreadContext tc = ThreadContextFactory.make();
View Full Code Here

        return endpoint;
    }

    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

        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

        this.sslContextParameters = sslContextParameters;
    }

    protected Server createServer() throws Exception {
        Server server = new Server();
        ContextHandlerCollection collection = new ContextHandlerCollection();
        server.setHandler(collection);
        return server;
    }
View Full Code Here

        extensions.add(extension);
    }

    protected Server createServer() throws Exception {
        Server server = new Server();
        ContextHandlerCollection collection = new ContextHandlerCollection();
        server.setHandler(collection);
        return server;
    }
View Full Code Here

 
  private synchronized void start() throws Exception {

    // Create the global context handler.
    contexts = new ContextHandlerCollection();
     // A map to keep track of current deployments by cluster name.
    deployments = new ConcurrentHashMap<String, WebAppContext>();

    // Determine the socket address and check availability.
    InetSocketAddress address = config.getGatewayAddress();
View Full Code Here

                            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

                ServerWebappActions.this.ready.set(true);
            }
        });

        final HandlerCollection handlerCollection = new HandlerCollection();
        this.setContextHandlerCollection(new ContextHandlerCollection());
        handlerCollection.addHandler(this.getContextHandlerCollection());
        this.getServer().setHandler(handlerCollection);
        this.logger.debug("server created");
    }
View Full Code Here

                            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

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

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.