public DiscoveryImpl(Vertx vertx, ServiceDiscoveryOptions options) { this(vertx, options, getBackend(options.getBackendConfiguration().getString("backend-name", null))); }
public DiscoveryImpl(Vertx vertx, ServiceDiscoveryOptions options) { this(vertx, options, getBackend(options.getBackendConfiguration().getString("backend-name", null))); }
public static void toJson(ServiceDiscoveryOptions obj, java.util.Map<String, Object> json) { if (obj.getAnnounceAddress() != null) { json.put("announceAddress", obj.getAnnounceAddress()); } json.put("autoRegistrationOfImporters", obj.isAutoRegistrationOfImporters()); if (obj.getBackendConfiguration() != null) { json.put("backendConfiguration", obj.getBackendConfiguration()); } if (obj.getName() != null) { json.put("name", obj.getName()); } if (obj.getUsageAddress() != null) { json.put("usageAddress", obj.getUsageAddress()); } } }
public static void toJson(ServiceDiscoveryOptions obj, java.util.Map<String, Object> json) { if (obj.getAnnounceAddress() != null) { json.put("announceAddress", obj.getAnnounceAddress()); } json.put("autoRegistrationOfImporters", obj.isAutoRegistrationOfImporters()); if (obj.getBackendConfiguration() != null) { json.put("backendConfiguration", obj.getBackendConfiguration()); } if (obj.getName() != null) { json.put("name", obj.getName()); } if (obj.getUsageAddress() != null) { json.put("usageAddress", obj.getUsageAddress()); } } }
/** * Creates a new instance of {@link DiscoveryImpl} * * @param vertx the vert.x instance * @param options the options * @param backend the backend service */ DiscoveryImpl(Vertx vertx, ServiceDiscoveryOptions options, ServiceDiscoveryBackend backend) { this.vertx = vertx; this.announce = options.getAnnounceAddress(); this.usage = options.getUsageAddress(); this.backend = backend; this.backend.init(vertx, options.getBackendConfiguration()); this.id = options.getName() != null ? options.getName() : getNodeId(vertx); this.options = options; }
/** * Creates a new instance of {@link DiscoveryImpl} * * @param vertx the vert.x instance * @param options the options * @param backend the backend service */ DiscoveryImpl(Vertx vertx, ServiceDiscoveryOptions options, ServiceDiscoveryBackend backend) { this.vertx = vertx; this.announce = options.getAnnounceAddress(); this.usage = options.getUsageAddress(); this.backend = backend; this.backend.init(vertx, options.getBackendConfiguration()); this.id = options.getName() != null ? options.getName() : getNodeId(vertx); this.options = options; }