All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.vertx.rxjava3.ext.unit.collect.EventBusCollector Maven / Gradle / Ivy

There is a newer version: 5.0.0.CR2
Show newest version
/*
 * Copyright 2014 Red Hat, Inc.
 *
 * Red Hat licenses this file to you under the Apache License, version 2.0
 * (the "License"); you may not use this file except in compliance with the
 * License.  You may obtain a copy of the License at:
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
 * License for the specific language governing permissions and limitations
 * under the License.
 */

package io.vertx.rxjava3.ext.unit.collect;

import io.vertx.rxjava3.RxHelper;
import io.vertx.rxjava3.ObservableHelper;
import io.vertx.rxjava3.FlowableHelper;
import io.vertx.rxjava3.impl.AsyncResultMaybe;
import io.vertx.rxjava3.impl.AsyncResultSingle;
import io.vertx.rxjava3.impl.AsyncResultCompletable;
import io.vertx.rxjava3.WriteStreamObserver;
import io.vertx.rxjava3.WriteStreamSubscriber;
import java.util.Map;
import java.util.Set;
import java.util.List;
import java.util.Iterator;
import java.util.function.Function;
import java.util.stream.Collectors;
import io.vertx.core.Handler;
import io.vertx.core.AsyncResult;
import io.vertx.core.json.JsonObject;
import io.vertx.core.json.JsonArray;
import io.vertx.lang.rx.RxGen;
import io.vertx.lang.rx.TypeArg;
import io.vertx.lang.rx.MappingIterator;

/**
 * The event bus collector listen to events on the Vert.x event bus and translate them
 * into reports.
 *
 * 

* NOTE: This class has been automatically generated from the {@link io.vertx.ext.unit.collect.EventBusCollector original} non RX-ified interface using Vert.x codegen. */ @RxGen(io.vertx.ext.unit.collect.EventBusCollector.class) public class EventBusCollector { @Override public String toString() { return delegate.toString(); } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; EventBusCollector that = (EventBusCollector) o; return delegate.equals(that.delegate); } @Override public int hashCode() { return delegate.hashCode(); } public static final TypeArg __TYPE_ARG = new TypeArg<>( obj -> new EventBusCollector((io.vertx.ext.unit.collect.EventBusCollector) obj), EventBusCollector::getDelegate ); private final io.vertx.ext.unit.collect.EventBusCollector delegate; public EventBusCollector(io.vertx.ext.unit.collect.EventBusCollector delegate) { this.delegate = delegate; } public EventBusCollector(Object delegate) { this.delegate = (io.vertx.ext.unit.collect.EventBusCollector)delegate; } public io.vertx.ext.unit.collect.EventBusCollector getDelegate() { return delegate; } /** * Create a message handler reporting with the specified options. The returned * message handler can be registered to an event bus. * @param vertx * @param options the reporting options * @return the message handler */ public static io.vertx.rxjava3.ext.unit.collect.EventBusCollector create(io.vertx.rxjava3.core.Vertx vertx, io.vertx.ext.unit.report.ReportingOptions options) { io.vertx.rxjava3.ext.unit.collect.EventBusCollector ret = io.vertx.rxjava3.ext.unit.collect.EventBusCollector.newInstance((io.vertx.ext.unit.collect.EventBusCollector)io.vertx.ext.unit.collect.EventBusCollector.create(vertx.getDelegate(), options)); return ret; } public static io.vertx.rxjava3.ext.unit.collect.EventBusCollector create(io.vertx.rxjava3.core.Vertx vertx, io.vertx.core.Handler reporter) { io.vertx.rxjava3.ext.unit.collect.EventBusCollector ret = io.vertx.rxjava3.ext.unit.collect.EventBusCollector.newInstance((io.vertx.ext.unit.collect.EventBusCollector)io.vertx.ext.unit.collect.EventBusCollector.create(vertx.getDelegate(), new io.vertx.lang.rx.DelegatingHandler<>(reporter, event -> io.vertx.rxjava3.ext.unit.report.TestSuiteReport.newInstance((io.vertx.ext.unit.report.TestSuiteReport)event)))); return ret; } /** * Register the collector as a consumer of the event bus with the specified address. * @param address the registration address * @return the subscribed message consumer */ public io.vertx.rxjava3.core.eventbus.MessageConsumer register(java.lang.String address) { io.vertx.rxjava3.core.eventbus.MessageConsumer ret = io.vertx.rxjava3.core.eventbus.MessageConsumer.newInstance((io.vertx.core.eventbus.MessageConsumer)delegate.register(address)); return ret; } /** * Json type field value that signals a test suite begins, used as part of the test reporting * protocol for the event bus. */ public static final java.lang.String EVENT_TEST_SUITE_BEGIN = io.vertx.ext.unit.collect.EventBusCollector.EVENT_TEST_SUITE_BEGIN; /** * Json type field value that signals a test suite ends, used as part of the test reporting * protocol for the event bus. */ public static final java.lang.String EVENT_TEST_SUITE_END = io.vertx.ext.unit.collect.EventBusCollector.EVENT_TEST_SUITE_END; /** * Json type field value that reports a test suite error, used as part of the test reporting * protocol for the event bus. */ public static final java.lang.String EVENT_TEST_SUITE_ERROR = io.vertx.ext.unit.collect.EventBusCollector.EVENT_TEST_SUITE_ERROR; /** * Json type field value that signals a test case begins, used as part of the test reporting * protocol for the event bus. */ public static final java.lang.String EVENT_TEST_CASE_BEGIN = io.vertx.ext.unit.collect.EventBusCollector.EVENT_TEST_CASE_BEGIN; /** * Json type field value that signals a test case ends, used as part of the test reporting * protocol for the event bus. */ public static final java.lang.String EVENT_TEST_CASE_END = io.vertx.ext.unit.collect.EventBusCollector.EVENT_TEST_CASE_END; public static EventBusCollector newInstance(io.vertx.ext.unit.collect.EventBusCollector arg) { return arg != null ? new EventBusCollector(arg) : null; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy