* 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);