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

co.spraybot.messagerunner.ReportStreamParcelProcessor Maven / Gradle / Ivy

package co.spraybot.messagerunner;

import io.vertx.core.Context;
import io.vertx.core.Future;
import io.vertx.core.Verticle;

/**
 * A Verticle responsible for initiating registered streams and providing a singular address that report requests can be
 * sent.
 *
 * @since 0.1.0
 */
public interface ReportStreamParcelProcessor extends ParcelProcessor, Verticle {

    /**
     * @param stream The ReportStream that you want this runner to initiate when appropriate ReportParameters are received
     *               to initiateStream.
     * @return The ReportStreamParcelProcessor to be used in a fluent style.
     */
    ReportStreamParcelProcessor registerReportStream(ReportStream stream);

    /**
     * Any code that needs to be executed on Vert.x event loop should be scheduled on the passed Context object.
     *
     * @param vertxContext The Vert.x Context this ReportStream should be processed under
     * @param parcel A set of data that defines the ReportStream that should be initiated.
     * @return Future that should succeed when the stream is finished or fail if there was an error.
     */
    Future initiateStream(Context vertxContext, ReportStreamParcel parcel);

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy