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

io.github.sinri.keel.servant.sundial.KeelSundialVerticle Maven / Gradle / Ivy

Go to download

A website framework with VERT.X for ex-PHP-ers, exactly Ark Framework Users.

The newest version!
package io.github.sinri.keel.servant.sundial;

import io.github.sinri.keel.verticles.KeelVerticleImplPure;
import io.vertx.core.Future;

import javax.annotation.Nonnull;
import java.util.Calendar;

/**
 * @since 3.2.4
 * @since 3.2.5 Used in KeelSundial
 */
public class KeelSundialVerticle extends KeelVerticleImplPure {
    private final KeelSundialPlan sundialPlan;
    private final Calendar now;

    public KeelSundialVerticle(@Nonnull KeelSundialPlan sundialPlan, Calendar now) {
        this.sundialPlan = sundialPlan;
        this.now = now;
    }

    @Override
    protected void startAsPureKeelVerticle() {
        Future.succeededFuture()
                .compose(v -> {
                    return sundialPlan.execute(now);
                })
                .onComplete(ar -> {
                    undeployMe();
                });
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy