Package com.strategicgains.restexpress

Examples of com.strategicgains.restexpress.RestExpress


public class Main
{
  public static void main(String[] args) throws Exception
  {
    Configuration config = loadEnvironment(args);
    RestExpress server = new RestExpress()
      .setName("RestExpress Benchmark")
        .setExecutorThreadCount(config.getExecutorThreadPoolSize())
        .alias("HelloWorld", HelloWorld.class);

    server.uri("/restexpress/json", config.getJsonController())
      .action("helloWorld", HttpMethod.GET);

    server.uri("/restexpress/mysql", config.getMysqlController())
      .method(HttpMethod.GET);

    server.uri("/restexpress/mongodb", config.getMongodbController())
        .method(HttpMethod.GET);

    server.bind(config.getPort());
    server.awaitShutdown();
  }
View Full Code Here

TOP

Related Classes of com.strategicgains.restexpress.RestExpress

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.