Search in sources :

Example 1 with ExecutionResult

use of eu.okaeri.platform.core.plan.ExecutionResult in project okaeri-platform by OkaeriPoland.

the class OkaeriBukkitPlugin method onEnable.

@Override
@Deprecated
public void onEnable() {
    // execute using plan
    this.log("Loading " + this.getClass().getSimpleName());
    ExecutionResult result = ExecutionPlan.dispatch(this);
    this.log(this.getCreator().getSummaryText(result.getTotalMillis()));
    this.plan = result.getPlan();
    // compatibility
    this.onPlatformEnable();
}
Also used : ExecutionResult(eu.okaeri.platform.core.plan.ExecutionResult)

Example 2 with ExecutionResult

use of eu.okaeri.platform.core.plan.ExecutionResult in project okaeri-platform by OkaeriPoland.

the class OkaeriCliApplication method run.

public static <T extends OkaeriCliApplication> T run(@NonNull T app, @NonNull String[] args) {
    OkaeriCliApplication.args = args;
    ExecutionResult result = ExecutionPlan.dispatch(app);
    app.log(app.getCreator().getSummaryText(result.getTotalMillis()));
    Thread shutdownHook = new Thread(() -> result.getPlan().execute(Arrays.asList(PRE_SHUTDOWN, SHUTDOWN, POST_SHUTDOWN)));
    Runtime.getRuntime().addShutdownHook(shutdownHook);
    return app;
}
Also used : ExecutionResult(eu.okaeri.platform.core.plan.ExecutionResult)

Example 3 with ExecutionResult

use of eu.okaeri.platform.core.plan.ExecutionResult in project okaeri-platform by OkaeriPoland.

the class OkaeriBungeePlugin method onEnable.

@Override
@Deprecated
public void onEnable() {
    // execute using plan
    this.log("Loading " + this.getClass().getSimpleName());
    ExecutionResult result = ExecutionPlan.dispatch(this);
    this.log(this.getCreator().getSummaryText(result.getTotalMillis()));
    this.plan = result.getPlan();
    // compatibility
    this.onPlatformEnable();
}
Also used : ExecutionResult(eu.okaeri.platform.core.plan.ExecutionResult)

Example 4 with ExecutionResult

use of eu.okaeri.platform.core.plan.ExecutionResult in project okaeri-platform by OkaeriPoland.

the class OkaeriWebApplication method run.

public static <T extends OkaeriWebApplication> T run(@NonNull T app, @NonNull String[] args) {
    ExecutionResult result = ExecutionPlan.dispatch(app);
    app.log(app.getCreator().getSummaryText(result.getTotalMillis()));
    Thread shutdownHook = new Thread(() -> result.getPlan().execute(Arrays.asList(PRE_SHUTDOWN, SHUTDOWN, POST_SHUTDOWN)));
    Runtime.getRuntime().addShutdownHook(shutdownHook);
    return app;
}
Also used : ExecutionResult(eu.okaeri.platform.core.plan.ExecutionResult)

Aggregations

ExecutionResult (eu.okaeri.platform.core.plan.ExecutionResult)4