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

com.arangodb.shaded.vertx.core.eventbus.MessageProducer Maven / Gradle / Ivy

There is a newer version: 7.8.0
Show newest version
/*
 * Copyright (c) 2011-2019 Contributors to the Eclipse Foundation
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License 2.0 which is available at
 * http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
 * which is available at https://www.apache.org/licenses/LICENSE-2.0.
 *
 * SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
 */

package com.arangodb.shaded.vertx.core.eventbus;

import com.arangodb.shaded.vertx.codegen.annotations.Fluent;
import com.arangodb.shaded.vertx.codegen.annotations.VertxGen;
import com.arangodb.shaded.vertx.core.AsyncResult;
import com.arangodb.shaded.vertx.core.Future;
import com.arangodb.shaded.vertx.core.Handler;
import com.arangodb.shaded.vertx.core.http.RequestOptions;
import com.arangodb.shaded.vertx.core.streams.WriteStream;

/**
 * Represents a stream of message that can be written to.
 * 

* * @author Julien Viet */ @VertxGen public interface MessageProducer { /** * Update the delivery options of this producer. * * @param options the new options * @return this producer object */ @Fluent MessageProducer deliveryOptions(DeliveryOptions options); /** * @return The address to which the producer produces messages. */ String address(); /** * Write a message to the event-bus, either sending or publishing. * * @param body the message body * @param handler the handler called when the message has been successfully or failed to be written, this is not a delivery * guarantee */ void write(T body, Handler> handler); /** * Like {@link #write(Object, Handler)} but returns a {@code Future} of the asynchronous result */ Future write(T body); /** * Closes the producer, this method should be called when the message producer is not used anymore. * * @return a future completed with the result */ Future close(); /** * Same as {@link #close()} but with an {@code handler} called when the operation completes */ void close(Handler> handler); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy