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

io.smallrye.mutiny.vertx.WriteStreamSubscriber Maven / Gradle / Ivy

There is a newer version: 3.17.1
Show newest version
package io.smallrye.mutiny.vertx;

import java.util.function.Consumer;

import org.reactivestreams.Subscriber;

/**
 * A {@link io.vertx.core.streams.WriteStream} to {@link org.reactivestreams.Subscriber} adapter.
 *
 * @param  the type of item.
 */
@SuppressWarnings("SubscriberImplementation")
public interface WriteStreamSubscriber extends Subscriber {

    /**
     * Sets the handler to invoke on failure events.
     * 

* The underlying {@link io.vertx.core.streams.WriteStream#end()} method is not invoked in this case. * * @param callback the callback invoked with the failure * @return a reference to this, so the API can be used fluently */ WriteStreamSubscriber onFailure(Consumer callback); /** * Sets the handler to invoke on completion events. *

* The underlying {@link io.vertx.core.streams.WriteStream#end()} method is invoked before the * given {@code callback}. * * @param callback the callback invoked when the completion event is received * @return a reference to this, so the API can be used fluently */ WriteStreamSubscriber onComplete(Runnable callback); /** * Sets the handler to invoke if the adapted {@link io.vertx.core.streams.WriteStream} fails. *

* The underlying {@link io.vertx.core.streams.WriteStream#end()} method is not invoked in this case. * * @param callback the callback invoked with the failure * @return a reference to this, so the API can be used fluently */ WriteStreamSubscriber onWriteStreamError(Consumer callback); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy