Package com.google.opengse

Examples of com.google.opengse.ServletEngineConfiguration


   * Convenience method to create a servlet engine.
   */
  public static ServletEngine create(
      int port, int numberOfThreads, FilterChain dispatcher)
      throws IOException, InterruptedException {
    ServletEngineConfiguration config =
        ServletEngineConfigurationImpl.create(port, numberOfThreads);
    return create(dispatcher, config);
  }
View Full Code Here


      = WebAppCollectionFactory.createWebAppCollectionWithOneContext(contextDir,
        context, configBuilder.getConfiguration());
    // start all of the webapps
    webapps.startAll();
    // create servlet engine configuration object
    ServletEngineConfiguration config
        = ServletEngineConfigurationImpl.create(PORT, MAX_THREADS);
    // the collection of webapps is our "request sink" (just done to illustrate)
    FilterChain requestSink = webapps;
    // create an engine using the engine configuration and send all requests
    // to our request sink
View Full Code Here

  /**
   * <p>Run this and then hit http://${host}:8080/foo?chunks=50&chunksize=100 in
   * order to get 50 chunks of size 100 bytes sent.
   */
  public static void main(String[] args) throws Exception {
    ServletEngineConfiguration config =
        ServletEngineConfigurationImpl.create(8080, 5);
    ServletEngineFactory engineFactory
        = JNDIMain.lookup(ServletEngineFactory.class);
    ServletEngine engine = engineFactory.createServletEngine(new ByteSpewer(), config);
    engine.run();
View Full Code Here

    // we'll hard-code the factory implementation now, for the sake of Simon Stewart
    // who's brother was killed by JNDIMain and he's never forgiven that class
    ServletEngineFactory engineFactory = new ServletEngineFactoryImpl();
    int port = 8080;
    int maxThreads = 5;
    ServletEngineConfiguration config = ServletEngineConfigurationImpl.create(port, maxThreads);
    ServletEngine engine = engineFactory.createServletEngine(helloWorld, config);
    engine.run();
  }
View Full Code Here

      = WebAppCollectionFactory.createWebAppCollectionWithOneContext(contextDir,
        context, configBuilder.getConfiguration());
    // start all of the webapps
    webapps.startAll();
    // create servlet engine configuration object
    ServletEngineConfiguration config
        = ServletEngineConfigurationImpl.create(PORT, MAX_THREADS);
    // the collection of webapps is our "request sink" (just done to illustrate)
    FilterChain requestSink = webapps;
    // create an engine using the enging configuration and send all requests
    // to our request sink
View Full Code Here

      = WebAppCollectionFactory.createWebAppCollectionWithOneContext(contextDir,
        context, configBuilder.getConfiguration());
    // start all of the webapps
    webapps.startAll();
    // create servlet engine configuration object
    ServletEngineConfiguration config
        = ServletEngineConfigurationImpl.create(PORT, MAX_THREADS);
    // the collection of webapps is our "request sink" (just done to illustrate)
    FilterChain requestSink = webapps;
    // create an engine using the enging configuration and send all requests
    // to our request sink
View Full Code Here

TOP

Related Classes of com.google.opengse.ServletEngineConfiguration

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.