Package org.deftserver.web

Examples of org.deftserver.web.Application


  public static void main(String[] args) {
    Map<String, RequestHandler> handlers = Maps.newHashMap();
    handlers.put("/", new ExampleRequestHandler());
   
    Application application = new Application(handlers);
    application.setStaticContentDir("static");
   
    HttpServerDescriptor.KEEP_ALIVE_TIMEOUT = 30 * 1000// 30s 
    HttpServerDescriptor.READ_BUFFER_SIZE = 1500;      // 1500 bytes
    HttpServerDescriptor.WRITE_BUFFER_SIZE = 1500;      // 1500 bytes
   
View Full Code Here


  }
 
  public static void main(String[] args) {
    Map<String, RequestHandler> handlers = new HashMap<String, RequestHandler>();
    handlers.put("/kv", new KeyValueStoreExampleRequestHandler());
    Application application = new Application(handlers);
    logger.debug("Starting up server on port: " + PORT);
    HttpServer server = new HttpServer(application);
    server.listen(PORT);
    IOLoop.INSTANCE.start();
  }
View Full Code Here

  public static void main(String[] args) {
    Map<String, RequestHandler> handlers = Maps.newHashMap();
    handlers.put("/", new ExampleRequestHandler());
   
    Application application = new Application(handlers);
    application.setStaticContentDir("static");
   
//    HttpServerDescriptor.KEEP_ALIVE_TIMEOUT = 30 * 1000;  // 30s 
//    HttpServerDescriptor.READ_BUFFER_SIZE = 1500;      // 1500 bytes
//    HttpServerDescriptor.WRITE_BUFFER_SIZE = 1500;      // 1500 bytes
   
View Full Code Here

TOP

Related Classes of org.deftserver.web.Application

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.