io.github.sinri.keel.servant.sundial.KeelSundialVerticle Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of Keel Show documentation
Show all versions of Keel Show documentation
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