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

io.vertx.up.commune.ActOut Maven / Gradle / Ivy

There is a newer version: 0.9.0
Show newest version
package io.vertx.up.commune;

import io.vertx.core.Future;
import io.vertx.core.json.JsonObject;
import io.vertx.up.unity.Ux;

import java.io.Serializable;

public class ActOut implements Serializable {

    private transient final Envelop envelop;

    public ActOut(final Object data) {
        envelop = Envelop.success(data);
    }

    public ActOut(final Throwable ex) {
        envelop = Envelop.failure(ex);
    }

    public static Future future() {
        return Ux.toFuture(new ActOut(new JsonObject()));
    }

    public Envelop sync() {
        return envelop;
    }

    public Future async() {
        return envelop.toFuture();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy