Example usage for io.vertx.core DeploymentOptions getConfig

List of usage examples for io.vertx.core DeploymentOptions getConfig

Introduction

In this page you can find the example usage for io.vertx.core DeploymentOptions getConfig.

Prototype

public JsonObject getConfig() 

Source Link

Document

Get the JSON configuration that will be passed to the verticle(s) when deployed.

Usage

From source file:io.nitor.api.backend.PropertiesLauncher.java

License:Apache License

@Override
public void beforeDeployingVerticle(DeploymentOptions deploymentOptions) {
    JsonObject conf = readDefaultsConf();
    JsonObject inputConf = deploymentOptions.getConfig();
    if (inputConf != null) {
        conf.mergeIn(inputConf);/*from  ww  w.j  a  v a2 s .  c om*/
    }

    override(conf, "");
    deploymentOptions.setConfig(conf);
}

From source file:io.silverware.microservices.utils.VertxUtils.java

License:Apache License

/**
 * Return the {@link String} representing the given {@link DeploymentOptions}
 *
 * @param options {@link DeploymentOptions} to be printed
 * @return {@link String} representing the given options
 *///w w w .j a va  2s. c  o  m
public static String printDeploymentOptions(DeploymentOptions options) {
    StringBuilder sb = new StringBuilder("{ ");
    sb.append("type = ");
    if (options.isWorker()) {
        sb.append(VerticleType.WORKER);
    } else if (options.isMultiThreaded()) {
        sb.append(VerticleType.MULTI_THREADED_WORKER);
    } else {
        sb.append(VerticleType.STANDARD);
    }

    sb.append(", instances = ").append(options.getInstances());
    sb.append(", isolationGroup = ").append(
            options.getIsolationGroup() == null ? VertxConstants.NOT_AVAILABLE : options.getIsolationGroup());
    sb.append(", isolatedClasses = ").append(
            options.getIsolatedClasses() == null ? VertxConstants.NOT_AVAILABLE : options.getIsolatedClasses());
    sb.append(", extraClasspath = ").append(
            options.getExtraClasspath() == null ? VertxConstants.NOT_AVAILABLE : options.getExtraClasspath());
    sb.append(", ha = ").append(options.isHa());
    sb.append(", config = ")
            .append(options.getConfig() == null ? VertxConstants.NOT_AVAILABLE : options.getConfig())
            .append(" }");
    return sb.toString();
}