@Override public void start() { ServiceDiscovery discovery = ServiceDiscovery.create(vertx, new ServiceDiscoveryOptions() .setAnnounceAddress("service-announce") .setName("my-name"));
/** * Creates a new instance of {@link ServiceDiscovery} using the default configuration. * * @param vertx the vert.x instance * @return the created instance */ static ServiceDiscovery create(Vertx vertx) { return create(vertx, new ServiceDiscoveryOptions()); }
/** * Creates a new instance of {@link ServiceDiscovery} using the default configuration. * * @param vertx the vert.x instance * @return the created instance */ static ServiceDiscovery create(Vertx vertx) { return create(vertx, new ServiceDiscoveryOptions()); }
public static io.vertx.servicediscovery.ServiceDiscovery create(io.vertx.servicediscovery.ServiceDiscovery j_receiver, io.vertx.core.Vertx vertx, java.util.Map<String, Object> options, io.vertx.core.Handler<io.vertx.servicediscovery.ServiceDiscovery> completionHandler) { return io.vertx.core.impl.ConversionHelper.fromObject(io.vertx.servicediscovery.ServiceDiscovery.create(vertx, options != null ? new io.vertx.servicediscovery.ServiceDiscoveryOptions(io.vertx.core.impl.ConversionHelper.toJsonObject(options)) : null, completionHandler != null ? event -> completionHandler.handle(io.vertx.core.impl.ConversionHelper.fromObject(event)) : null)); } public static void releaseServiceObject(io.vertx.servicediscovery.ServiceDiscovery j_receiver, io.vertx.servicediscovery.ServiceDiscovery discovery, java.lang.Object svcObject) {
@Before public void setUp() { vertx = Vertx.vertx(); discovery = new DiscoveryImpl(vertx, new ServiceDiscoveryOptions()); }
@Before public void setUp() { vertx = Vertx.vertx(); discovery = new DiscoveryImpl(vertx, new ServiceDiscoveryOptions()); } }
@Before public void setUp() { vertx = Vertx.vertx(); discovery = new DiscoveryImpl(vertx, new ServiceDiscoveryOptions()); }
@Before public void setUp() { vertx = Vertx.vertx(); discovery = new DiscoveryImpl(vertx, new ServiceDiscoveryOptions()); }
@Before public void setUp() { vertx = Vertx.vertx(); discovery = new DiscoveryImpl(vertx, new ServiceDiscoveryOptions()); }
@Before public void setUp() { vertx = Vertx.vertx(); discovery = new DiscoveryImpl(vertx, new ServiceDiscoveryOptions()); }
@Before public void setUp() { vertx = Vertx.vertx(); discovery = new DiscoveryImpl(vertx, new ServiceDiscoveryOptions()); }
@Before public void setUp() { vertx = Vertx.vertx(); discovery = new DiscoveryImpl(vertx, new ServiceDiscoveryOptions()); }
@Before public void setUp() { vertx = Vertx.vertx(); discovery = new DiscoveryImpl(vertx, new ServiceDiscoveryOptions()); }
@Before public void setUp() { vertx = Vertx.vertx(); discovery = new DiscoveryImpl(vertx, new ServiceDiscoveryOptions()); }
@Before public void setUp() { vertx = Vertx.vertx(); discovery = new DiscoveryImpl(vertx, new ServiceDiscoveryOptions()); Router router = Router.router(vertx); ServiceDiscoveryRestEndpoint.create(router, discovery); AtomicBoolean done = new AtomicBoolean(); http = vertx.createHttpServer().requestHandler(router::accept) .listen(8080, ar -> done.set(ar.succeeded())); await().untilAtomic(done, is(true)); }
@Before public void setUp() { vertx = Vertx.vertx(); options = new ServiceDiscoveryOptions().setName("my-schema-discovery"); discovery = ServiceDiscovery.create(vertx, options); }
@Test public void testName() { ServiceDiscoveryOptions options = new ServiceDiscoveryOptions().setName("my-name"); assertThat(options.getName()).isEqualToIgnoringCase("my-name"); }
@Before public void setUp() { vertx = Vertx.vertx(); options = new ServiceDiscoveryOptions().setName("theDiscovery") .setAnnounceAddress("theAnnounceAddress").setUsageAddress("theUsageAddress"); schemaPublisher = new TestClass(vertx); }
@Before public void setUp() { vertx = rule.vertx(); options = new ServiceDiscoveryOptions().setName("theDiscovery") .setAnnounceAddress("announceAddress").setUsageAddress("usageAddress"); schemaRegistrar = SchemaRegistrar.create(vertx); schemaPublisher = new TestClass(schemaRegistrar); }
@Test public void should_Create_Service_Discovery_And_Return_Registration() { DiscoveryRegistration defaultRegistration = SchemaConsumer.startDiscovery(testClass); DiscoveryRegistration registration = SchemaConsumer .startDiscovery(new ServiceDiscoveryOptions().setName("the-discovery"), testClass); assertNotNull(defaultRegistration); assertNotNull(registration); assertNotNull(registration.getDiscovery()); assertNotNull(registration.getDiscoveryOptions()); assertEquals(2, testClass.managedDiscoveries().size()); }