Package com.elastisys.scale.commons.rest.server

Examples of com.elastisys.scale.commons.rest.server.JaxRsApplication


   *             create the server.
   */
  public static Server createServer(CloudAdapter cloudAdapter,
      CloudAdapterOptions options) throws Exception {

    JaxRsApplication application = new JaxRsApplication();
    // deploy pool handler
    application.addHandler(new PoolHandler(cloudAdapter));

    if (options.enableConfigHandler) {
      // optionally deploy config handler and config schema handler
      application.addHandler(new ConfigHandler(cloudAdapter));
      application.addHandler(new ConfigSchemaHandler(cloudAdapter));
    }

    if (options.enableExitHandler) {
      // optionally deploy exit handler
      application.addHandler(new ExitHandler());
    }

    if (options.config != null) {
      // optionally configure cloud adapter
      JsonObject configuration = parseJsonConfig(options.config);
View Full Code Here

TOP

Related Classes of com.elastisys.scale.commons.rest.server.JaxRsApplication

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.