Search in sources :

Example 91 with Promise

use of io.vertx.core.Promise in project hono by eclipse.

the class AmqpServiceBase method startSecureServer.

private Future<Void> startSecureServer() {
    if (isSecurePortEnabled()) {
        final int securePort = determineSecurePort();
        final Promise<Void> result = Promise.promise();
        final ProtonServerOptions options = createServerOptions();
        server = createProtonServer(options).connectHandler(this::onRemoteConnectionOpen).listen(securePort, getConfig().getBindAddress(), bindAttempt -> {
            if (bindAttempt.succeeded()) {
                if (getPort() == getPortDefaultValue()) {
                    log.info("server listens on standard secure port [{}:{}]", getBindAddress(), getPort());
                } else {
                    log.warn("server listens on non-standard secure port [{}:{}], default is {}", getBindAddress(), getPort(), getPortDefaultValue());
                }
                result.complete();
            } else {
                log.error("cannot bind to secure port", bindAttempt.cause());
                result.fail(bindAttempt.cause());
            }
        });
        return result.future();
    } else {
        log.info("secure port is not enabled");
        return Future.succeededFuture();
    }
}
Also used : ProtonConnection(io.vertx.proton.ProtonConnection) ProtonReceiver(io.vertx.proton.ProtonReceiver) ProtonServerOptions(io.vertx.proton.ProtonServerOptions) HashMap(java.util.HashMap) HonoUser(org.eclipse.hono.auth.HonoUser) ServiceConfigProperties(org.eclipse.hono.config.ServiceConfigProperties) Constants(org.eclipse.hono.util.Constants) ProtonServer(io.vertx.proton.ProtonServer) HonoProtonHelper(org.eclipse.hono.util.HonoProtonHelper) ArrayList(java.util.ArrayList) CompositeFuture(io.vertx.core.CompositeFuture) ProtonSession(io.vertx.proton.ProtonSession) HealthCheckHandler(io.vertx.ext.healthchecks.HealthCheckHandler) Symbol(org.apache.qpid.proton.amqp.Symbol) Duration(java.time.Duration) Map(java.util.Map) ResourceIdentifier(org.eclipse.hono.util.ResourceIdentifier) AmqpError(org.apache.qpid.proton.amqp.transport.AmqpError) AsyncResult(io.vertx.core.AsyncResult) WeakReference(java.lang.ref.WeakReference) ProtonSaslAuthenticatorFactory(io.vertx.proton.sasl.ProtonSaslAuthenticatorFactory) Strings(org.eclipse.hono.util.Strings) Promise(io.vertx.core.Promise) ProtonHelper(io.vertx.proton.ProtonHelper) Instant(java.time.Instant) Activity(org.eclipse.hono.auth.Activity) Future(io.vertx.core.Future) Objects(java.util.Objects) List(java.util.List) Source(org.apache.qpid.proton.amqp.transport.Source) AbstractServiceBase(org.eclipse.hono.service.AbstractServiceBase) ProtonSender(io.vertx.proton.ProtonSender) ClaimsBasedAuthorizationService(org.eclipse.hono.service.auth.ClaimsBasedAuthorizationService) ProtonLink(io.vertx.proton.ProtonLink) AuthorizationService(org.eclipse.hono.service.auth.AuthorizationService) ProtonServerOptions(io.vertx.proton.ProtonServerOptions)

Example 92 with Promise

use of io.vertx.core.Promise in project hono by eclipse.

the class Application method doStart.

@Override
protected void doStart() {
    if (!(authenticationService instanceof Verticle)) {
        throw new IllegalStateException("Authentication service must be a vert.x Verticle");
    }
    LOG.info("adding common tags to meter registry");
    meterRegistry.config().commonTags(MetricsTags.forService(Constants.SERVICE_NAME_DEVICE_REGISTRY));
    LOG.info("deploying {} {} instances ...", appConfig.getMaxInstances(), getComponentName());
    final CompletableFuture<Void> startup = new CompletableFuture<>();
    // deploy authentication service (once only)
    final Promise<String> authServiceDeploymentTracker = Promise.promise();
    vertx.deployVerticle((Verticle) authenticationService, authServiceDeploymentTracker);
    // deploy notification sender (once only)
    final Promise<String> notificationSenderDeploymentTracker = Promise.promise();
    vertx.deployVerticle(new WrappedLifecycleComponentVerticle(notificationSender), notificationSenderDeploymentTracker);
    // deploy AMQP 1.0 server
    final Promise<String> amqpServerDeploymentTracker = Promise.promise();
    vertx.deployVerticle(() -> amqpServerFactory.newServer(), new DeploymentOptions().setInstances(appConfig.getMaxInstances()), amqpServerDeploymentTracker);
    // deploy HTTP server
    final Promise<String> httpServerDeploymentTracker = Promise.promise();
    vertx.deployVerticle(() -> httpServerFactory.newServer(), new DeploymentOptions().setInstances(appConfig.getMaxInstances()), httpServerDeploymentTracker);
    CompositeFuture.all(authServiceDeploymentTracker.future(), notificationSenderDeploymentTracker.future(), amqpServerDeploymentTracker.future(), httpServerDeploymentTracker.future()).onSuccess(ok -> registerHealthCheckProvider(authenticationService)).compose(s -> healthCheckServer.start()).onSuccess(ok -> startup.complete(null)).onFailure(t -> startup.completeExceptionally(t));
    startup.join();
}
Also used : NotificationSender(org.eclipse.hono.notification.NotificationSender) Logger(org.slf4j.Logger) Promise(io.vertx.core.Promise) AuthenticationService(org.eclipse.hono.service.auth.AuthenticationService) MetricsTags(org.eclipse.hono.service.metric.MetricsTags) LoggerFactory(org.slf4j.LoggerFactory) CompletableFuture(java.util.concurrent.CompletableFuture) Verticle(io.vertx.core.Verticle) Constants(org.eclipse.hono.util.Constants) Inject(javax.inject.Inject) AbstractServiceApplication(org.eclipse.hono.service.quarkus.AbstractServiceApplication) CompositeFuture(io.vertx.core.CompositeFuture) DeploymentOptions(io.vertx.core.DeploymentOptions) ApplicationScoped(javax.enterprise.context.ApplicationScoped) WrappedLifecycleComponentVerticle(org.eclipse.hono.util.WrappedLifecycleComponentVerticle) Verticle(io.vertx.core.Verticle) WrappedLifecycleComponentVerticle(org.eclipse.hono.util.WrappedLifecycleComponentVerticle) CompletableFuture(java.util.concurrent.CompletableFuture) WrappedLifecycleComponentVerticle(org.eclipse.hono.util.WrappedLifecycleComponentVerticle) DeploymentOptions(io.vertx.core.DeploymentOptions)

Example 93 with Promise

use of io.vertx.core.Promise in project hono by eclipse.

the class AmqpUploadTestBase method testUploadMessages.

// ------------------------------------------< private methods >---
private void testUploadMessages(final String tenantId, final ProtonQoS senderQoS) throws InterruptedException {
    final VertxTestContext messageSending = new VertxTestContext();
    final Function<Handler<Void>, Future<Void>> receiver = callback -> {
        return createConsumer(tenantId, msg -> {
            if (log.isTraceEnabled()) {
                log.trace("received message [{}]: {}", msg.getContentType(), msg.getPayload().toString());
            }
            messageSending.verify(() -> {
                DownstreamMessageAssertions.assertTelemetryMessageProperties(msg, tenantId);
                assertThat(msg.getQos()).isEqualTo(AmqpUploadTestBase.getQoS(senderQoS));
                assertAdditionalMessageProperties(msg);
                callback.handle(null);
            });
        }).mapEmpty();
    };
    doUploadMessages(messageSending, receiver, payload -> {
        final Message msg = ProtonHelper.message();
        MessageHelper.setPayload(msg, "opaque/binary", payload);
        msg.setAddress(getEndpointName());
        final Promise<Void> sendingComplete = Promise.promise();
        final Handler<ProtonSender> sendMsgHandler = replenishedSender -> {
            replenishedSender.sendQueueDrainHandler(null);
            switch(senderQoS) {
                case AT_LEAST_ONCE:
                    replenishedSender.send(msg, delivery -> {
                        if (Accepted.class.isInstance(delivery.getRemoteState())) {
                            sendingComplete.complete();
                        } else {
                            sendingComplete.fail(AmqpErrorException.from(delivery.getRemoteState()));
                        }
                    });
                    break;
                case AT_MOST_ONCE:
                    replenishedSender.send(msg);
                    sendingComplete.complete();
                    break;
            }
        };
        context.runOnContext(go -> {
            if (sender.getCredit() <= 0) {
                log.trace("wait for credit ...");
                sender.sendQueueDrainHandler(sendMsgHandler);
            } else {
                sendMsgHandler.handle(sender);
            }
        });
        return sendingComplete.future();
    });
}
Also used : HttpURLConnection(java.net.HttpURLConnection) VertxTestContext(io.vertx.junit5.VertxTestContext) AmqpErrorException(org.eclipse.hono.util.AmqpErrorException) DownstreamMessage(org.eclipse.hono.application.client.DownstreamMessage) Rejected(org.apache.qpid.proton.amqp.messaging.Rejected) SelfSignedCertificate(io.vertx.core.net.SelfSignedCertificate) Function(java.util.function.Function) Constants(org.eclipse.hono.util.Constants) Tenant(org.eclipse.hono.service.management.tenant.Tenant) Timeout(io.vertx.junit5.Timeout) IntegrationTestSupport(org.eclipse.hono.tests.IntegrationTestSupport) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Symbol(org.apache.qpid.proton.amqp.Symbol) UnsignedLong(org.apache.qpid.proton.amqp.UnsignedLong) Message(org.apache.qpid.proton.message.Message) Binary(org.apache.qpid.proton.amqp.Binary) Tenants(org.eclipse.hono.tests.Tenants) RegistryManagementConstants(org.eclipse.hono.util.RegistryManagementConstants) MethodSource(org.junit.jupiter.params.provider.MethodSource) Data(org.apache.qpid.proton.amqp.messaging.Data) Device(org.eclipse.hono.service.management.device.Device) MessageContext(org.eclipse.hono.application.client.MessageContext) Truth.assertWithMessage(com.google.common.truth.Truth.assertWithMessage) LinkError(org.apache.qpid.proton.amqp.transport.LinkError) Promise(io.vertx.core.Promise) ServerErrorException(org.eclipse.hono.client.ServerErrorException) DownstreamMessageAssertions(org.eclipse.hono.tests.DownstreamMessageAssertions) ProtonHelper(io.vertx.proton.ProtonHelper) ProtonQoS(io.vertx.proton.ProtonQoS) Truth.assertThat(com.google.common.truth.Truth.assertThat) MessageHelper(org.eclipse.hono.util.MessageHelper) EventConstants(org.eclipse.hono.util.EventConstants) Future(io.vertx.core.Future) TimeUnit(java.util.concurrent.TimeUnit) Test(org.junit.jupiter.api.Test) CountDownLatch(java.util.concurrent.CountDownLatch) ErrorCondition(org.apache.qpid.proton.amqp.transport.ErrorCondition) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) Buffer(io.vertx.core.buffer.Buffer) Assertions(org.junit.jupiter.api.Assertions) MessageConsumer(org.eclipse.hono.application.client.MessageConsumer) ProtonSender(io.vertx.proton.ProtonSender) Handler(io.vertx.core.Handler) Collections(java.util.Collections) Accepted(org.apache.qpid.proton.amqp.messaging.Accepted) QoS(org.eclipse.hono.util.QoS) ProtonSender(io.vertx.proton.ProtonSender) DownstreamMessage(org.eclipse.hono.application.client.DownstreamMessage) Message(org.apache.qpid.proton.message.Message) Truth.assertWithMessage(com.google.common.truth.Truth.assertWithMessage) VertxTestContext(io.vertx.junit5.VertxTestContext) Handler(io.vertx.core.Handler) Future(io.vertx.core.Future) Accepted(org.apache.qpid.proton.amqp.messaging.Accepted)

Example 94 with Promise

use of io.vertx.core.Promise in project hono by eclipse.

the class AmqpUploadTestBase method testAutoProvisioningViaGateway.

/**
 * Verifies that an edge device is auto-provisioned if it connects via a gateway equipped with the corresponding
 * authority.
 *
 * @param ctx The Vert.x test context.
 */
@Test
@Timeout(timeUnit = TimeUnit.SECONDS, value = 10)
public void testAutoProvisioningViaGateway(final VertxTestContext ctx) {
    final String tenantId = helper.getRandomTenantId();
    final String gatewayId = helper.getRandomDeviceId(tenantId);
    final Device gateway = new Device().setAuthorities(Collections.singleton(RegistryManagementConstants.AUTHORITY_AUTO_PROVISIONING_ENABLED));
    final String username = IntegrationTestSupport.getUsername(gatewayId, tenantId);
    final String edgeDeviceId = helper.getRandomDeviceId(tenantId);
    final Promise<Void> provisioningNotificationReceived = Promise.promise();
    helper.createAutoProvisioningMessageConsumers(ctx, provisioningNotificationReceived, tenantId, edgeDeviceId).compose(ok -> helper.registry.addDeviceForTenant(tenantId, new Tenant(), gatewayId, gateway, DEVICE_PASSWORD)).compose(ok -> connectToAdapter(username, DEVICE_PASSWORD)).compose(con -> createProducer(null, ProtonQoS.AT_LEAST_ONCE)).compose(sender -> {
        final Message msg = ProtonHelper.message("apFoobar");
        msg.setContentType("text/plain");
        msg.setAddress(String.format("%s/%s/%s", getEndpointName(), tenantId, edgeDeviceId));
        final Promise<Void> result = Promise.promise();
        sender.send(msg, delivery -> {
            ctx.verify(() -> assertThat(delivery.getRemoteState()).isInstanceOf(Accepted.class));
            result.complete();
        });
        return result.future();
    }).compose(ok -> provisioningNotificationReceived.future()).compose(ok -> helper.registry.getRegistrationInfo(tenantId, edgeDeviceId)).onComplete(ctx.succeeding(registrationResult -> {
        ctx.verify(() -> {
            final var info = registrationResult.bodyAsJsonObject();
            IntegrationTestSupport.assertDeviceStatusProperties(info.getJsonObject(RegistryManagementConstants.FIELD_STATUS), true);
        });
        ctx.completeNow();
    }));
}
Also used : HttpURLConnection(java.net.HttpURLConnection) VertxTestContext(io.vertx.junit5.VertxTestContext) AmqpErrorException(org.eclipse.hono.util.AmqpErrorException) DownstreamMessage(org.eclipse.hono.application.client.DownstreamMessage) Rejected(org.apache.qpid.proton.amqp.messaging.Rejected) SelfSignedCertificate(io.vertx.core.net.SelfSignedCertificate) Function(java.util.function.Function) Constants(org.eclipse.hono.util.Constants) Tenant(org.eclipse.hono.service.management.tenant.Tenant) Timeout(io.vertx.junit5.Timeout) IntegrationTestSupport(org.eclipse.hono.tests.IntegrationTestSupport) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Symbol(org.apache.qpid.proton.amqp.Symbol) UnsignedLong(org.apache.qpid.proton.amqp.UnsignedLong) Message(org.apache.qpid.proton.message.Message) Binary(org.apache.qpid.proton.amqp.Binary) Tenants(org.eclipse.hono.tests.Tenants) RegistryManagementConstants(org.eclipse.hono.util.RegistryManagementConstants) MethodSource(org.junit.jupiter.params.provider.MethodSource) Data(org.apache.qpid.proton.amqp.messaging.Data) Device(org.eclipse.hono.service.management.device.Device) MessageContext(org.eclipse.hono.application.client.MessageContext) Truth.assertWithMessage(com.google.common.truth.Truth.assertWithMessage) LinkError(org.apache.qpid.proton.amqp.transport.LinkError) Promise(io.vertx.core.Promise) ServerErrorException(org.eclipse.hono.client.ServerErrorException) DownstreamMessageAssertions(org.eclipse.hono.tests.DownstreamMessageAssertions) ProtonHelper(io.vertx.proton.ProtonHelper) ProtonQoS(io.vertx.proton.ProtonQoS) Truth.assertThat(com.google.common.truth.Truth.assertThat) MessageHelper(org.eclipse.hono.util.MessageHelper) EventConstants(org.eclipse.hono.util.EventConstants) Future(io.vertx.core.Future) TimeUnit(java.util.concurrent.TimeUnit) Test(org.junit.jupiter.api.Test) CountDownLatch(java.util.concurrent.CountDownLatch) ErrorCondition(org.apache.qpid.proton.amqp.transport.ErrorCondition) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) Buffer(io.vertx.core.buffer.Buffer) Assertions(org.junit.jupiter.api.Assertions) MessageConsumer(org.eclipse.hono.application.client.MessageConsumer) ProtonSender(io.vertx.proton.ProtonSender) Handler(io.vertx.core.Handler) Collections(java.util.Collections) Accepted(org.apache.qpid.proton.amqp.messaging.Accepted) QoS(org.eclipse.hono.util.QoS) Promise(io.vertx.core.Promise) Tenant(org.eclipse.hono.service.management.tenant.Tenant) DownstreamMessage(org.eclipse.hono.application.client.DownstreamMessage) Message(org.apache.qpid.proton.message.Message) Truth.assertWithMessage(com.google.common.truth.Truth.assertWithMessage) Device(org.eclipse.hono.service.management.device.Device) Test(org.junit.jupiter.api.Test) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) Timeout(io.vertx.junit5.Timeout)

Example 95 with Promise

use of io.vertx.core.Promise in project hono by eclipse.

the class IntegrationTestSupport method createAutoProvisioningMessageConsumers.

/**
 * Create an event and a telemetry consumer which verify that at least one empty notification and at
 * least one further message, be it an event or telemetry, was received according to the specification
 * of gateway-based auto-provisioning.
 *
 * @param ctx The test context to fail if the notification event does not contain all required properties.
 * @param provisioningNotificationReceived The promise to complete, once the provisioning notification has been
 *                                         received.
 * @param tenantId The tenant for which the consumer should be created.
 * @param deviceId The id of the device which sent the messages.
 *
 * @return A succeeded future if the message consumers have been created successfully.
 */
public Future<Void> createAutoProvisioningMessageConsumers(final VertxTestContext ctx, final Promise<Void> provisioningNotificationReceived, final String tenantId, final String deviceId) {
    final Checkpoint messagesReceived = ctx.checkpoint(2);
    return applicationClient.createEventConsumer(tenantId, msg -> {
        ctx.verify(() -> {
            assertThat(msg.getDeviceId()).isEqualTo(deviceId);
            if (msg.getContentType().equals(EventConstants.CONTENT_TYPE_DEVICE_PROVISIONING_NOTIFICATION)) {
                assertThat(msg.getTenantId()).isEqualTo(tenantId);
                assertThat(getRegistrationStatus(msg)).isEqualTo(EventConstants.RegistrationStatus.NEW.name());
                messagesReceived.flag();
                provisioningNotificationReceived.complete();
            } else {
                messagesReceived.flag();
            }
        });
    }, close -> {
    }).compose(ok -> applicationClient.createTelemetryConsumer(tenantId, msg -> {
        ctx.verify(() -> {
            if (!msg.getContentType().equals(EventConstants.CONTENT_TYPE_DEVICE_PROVISIONING_NOTIFICATION)) {
                messagesReceived.flag();
            }
        });
    }, close -> {
    })).mapEmpty();
}
Also used : HttpURLConnection(java.net.HttpURLConnection) X509Certificate(java.security.cert.X509Certificate) KeyPair(java.security.KeyPair) ApplicationClient(org.eclipse.hono.application.client.ApplicationClient) Arrays(java.util.Arrays) MessagingKafkaConsumerConfigProperties(org.eclipse.hono.client.kafka.consumer.MessagingKafkaConsumerConfigProperties) DownstreamMessage(org.eclipse.hono.application.client.DownstreamMessage) MessagingKafkaProducerConfigProperties(org.eclipse.hono.client.kafka.producer.MessagingKafkaProducerConfigProperties) TenantConstants(org.eclipse.hono.util.TenantConstants) LoggerFactory(org.slf4j.LoggerFactory) TimeoutException(java.util.concurrent.TimeoutException) VertxTools(org.eclipse.hono.test.VertxTools) InetAddress(java.net.InetAddress) GeneralSecurityException(java.security.GeneralSecurityException) MessagingType(org.eclipse.hono.util.MessagingType) PskCredential(org.eclipse.hono.service.management.credentials.PskCredential) ProtonBasedApplicationClient(org.eclipse.hono.application.client.amqp.ProtonBasedApplicationClient) Map(java.util.Map) Pair(org.eclipse.hono.util.Pair) JsonObject(io.vertx.core.json.JsonObject) ClientConfigProperties(org.eclipse.hono.config.ClientConfigProperties) KeyPairGenerator(java.security.KeyPairGenerator) Device(org.eclipse.hono.service.management.device.Device) MessageContext(org.eclipse.hono.application.client.MessageContext) Truth.assertWithMessage(com.google.common.truth.Truth.assertWithMessage) CachingKafkaProducerFactory(org.eclipse.hono.client.kafka.producer.CachingKafkaProducerFactory) Set(java.util.Set) ConsumerConfig(org.apache.kafka.clients.consumer.ConsumerConfig) UUID(java.util.UUID) Instant(java.time.Instant) MessageHelper(org.eclipse.hono.util.MessageHelper) RequestResponseApiConstants(org.eclipse.hono.util.RequestResponseApiConstants) Collectors(java.util.stream.Collectors) EventConstants(org.eclipse.hono.util.EventConstants) Future(io.vertx.core.Future) StandardCharsets(java.nio.charset.StandardCharsets) AsyncHandlingAutoCommitKafkaConsumer(org.eclipse.hono.client.kafka.consumer.AsyncHandlingAutoCommitKafkaConsumer) Objects(java.util.Objects) Base64(java.util.Base64) List(java.util.List) KafkaProducerFactory(org.eclipse.hono.client.kafka.producer.KafkaProducerFactory) Buffer(io.vertx.core.buffer.Buffer) MessageProperties(org.eclipse.hono.application.client.MessageProperties) Optional(java.util.Optional) Checkpoint(io.vertx.junit5.Checkpoint) Queue(java.util.Queue) VertxTestContext(io.vertx.junit5.VertxTestContext) HttpResponse(io.vertx.ext.web.client.HttpResponse) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) Credentials(org.eclipse.hono.service.management.credentials.Credentials) HashMap(java.util.HashMap) OptionalInt(java.util.OptionalInt) Function(java.util.function.Function) Constants(org.eclipse.hono.util.Constants) TimeUntilDisconnectNotification(org.eclipse.hono.util.TimeUntilDisconnectNotification) HashSet(java.util.HashSet) CompositeFuture(io.vertx.core.CompositeFuture) KafkaAdminClientConfigProperties(org.eclipse.hono.client.kafka.KafkaAdminClientConfigProperties) LinkedList(java.util.LinkedList) HonoConnection(org.eclipse.hono.client.HonoConnection) CommandConstants(org.eclipse.hono.util.CommandConstants) ProducerConfig(org.apache.kafka.clients.producer.ProducerConfig) RegistryManagementConstants(org.eclipse.hono.util.RegistryManagementConstants) Strings(org.eclipse.hono.util.Strings) Logger(org.slf4j.Logger) Iterator(java.util.Iterator) Promise(io.vertx.core.Promise) KafkaApplicationClientImpl(org.eclipse.hono.application.client.kafka.impl.KafkaApplicationClientImpl) Vertx(io.vertx.core.Vertx) Truth.assertThat(com.google.common.truth.Truth.assertThat) ExecutionException(java.util.concurrent.ExecutionException) TimeUnit(java.util.concurrent.TimeUnit) HonoTopic(org.eclipse.hono.client.kafka.HonoTopic) JsonArray(io.vertx.core.json.JsonArray) MessageConsumer(org.eclipse.hono.application.client.MessageConsumer) SendMessageTimeoutException(org.eclipse.hono.client.SendMessageTimeoutException) SendMessageSampler(org.eclipse.hono.client.SendMessageSampler) NoopSpan(io.opentracing.noop.NoopSpan) GenericSenderLink(org.eclipse.hono.client.amqp.GenericSenderLink) Handler(io.vertx.core.Handler) PasswordCredential(org.eclipse.hono.service.management.credentials.PasswordCredential) KafkaAdminClient(io.vertx.kafka.admin.KafkaAdminClient) Checkpoint(io.vertx.junit5.Checkpoint)

Aggregations

Promise (io.vertx.core.Promise)155 Future (io.vertx.core.Future)122 Handler (io.vertx.core.Handler)95 List (java.util.List)86 Vertx (io.vertx.core.Vertx)85 Buffer (io.vertx.core.buffer.Buffer)83 TimeUnit (java.util.concurrent.TimeUnit)79 HttpURLConnection (java.net.HttpURLConnection)66 Logger (org.slf4j.Logger)63 LoggerFactory (org.slf4j.LoggerFactory)63 Optional (java.util.Optional)62 AsyncResult (io.vertx.core.AsyncResult)61 Truth.assertThat (com.google.common.truth.Truth.assertThat)60 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)60 VertxTestContext (io.vertx.junit5.VertxTestContext)59 Test (org.junit.jupiter.api.Test)58 Map (java.util.Map)54 UUID (java.util.UUID)52 ArrayList (java.util.ArrayList)51 JsonObject (io.vertx.core.json.JsonObject)50