package ru.kirillius.pf.sdn.core;

/**
 * Provides access to core services and configuration for application components.
 */
public interface Context {
    /**
     * Returns immutable launcher parameters shared across services.
     */
    LauncherConfig getLauncherConfig();
    /**
     * Provides access to the service registry for retrieving components.
     */
    ServiceManager getServiceManager();
    /**
     * Supplies the mutable runtime configuration.
     */
    Config getConfig();
    /**
     * Exposes event hooks for subscribers interested in runtime changes.
     */
    ContextEventsHandler getEventsHandler();
    /**
     * Signals the application to exit, optionally requesting a restart.
     *
     * @param shouldRestart {@code true} to exit with restart intent, {@code false} to shut down.
     */
    void requestExit(boolean shouldRestart);
}
