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

io.github.sinri.keel.verticles.KeelVerticleImplWithIssueRecorder 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.verticles;

import io.github.sinri.keel.logger.issue.record.KeelIssueRecord;
import io.github.sinri.keel.logger.issue.recorder.KeelIssueRecorder;
import io.vertx.core.AbstractVerticle;
import io.vertx.core.Promise;

import javax.annotation.Nonnull;

abstract public class KeelVerticleImplWithIssueRecorder> extends AbstractVerticle implements KeelVerticle {
    private @Nonnull KeelIssueRecorder issueRecorder;

    public KeelVerticleImplWithIssueRecorder() {
        this.issueRecorder = buildIssueRecorder();
    }

    @Nonnull
    public KeelIssueRecorder getIssueRecorder() {
        return issueRecorder;
    }

    abstract protected @Nonnull KeelIssueRecorder buildIssueRecorder();

    @Override
    public final void start(Promise startPromise) {
        this.issueRecorder = buildIssueRecorder();
        startAsKeelVerticle(startPromise);
    }

    @Override
    public final void start() {
        this.issueRecorder = buildIssueRecorder();
        this.startAsKeelVerticle();
    }

    protected void startAsKeelVerticle(Promise startPromise) {
        startAsKeelVerticle();
        startPromise.complete();
    }

    abstract protected void startAsKeelVerticle();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy