67 std::map<Data_Structure::ScenarioPtr, StopStrategyPtr> stopStrategy;
68 std::map<Data_Structure::ScenarioPtr, ApplicationStarterPtr> starter;
72 static constexpr std::chrono::milliseconds PropertyGenerationTimeout{30000};
81 const std::filesystem::path& xmlFilePath);
89 const std::string& commandLineParameters,
92 std::mutex lifecyclesMutex;
93 std::map<Data_Structure::ApplicationInstance*, ApplicationLifecyclePtr> lifecycles;
114 bool printOnly =
false,
115 const std::string& commandLineParameters =
"");
128 bool printOnly =
false);
155 bool printOnly =
false,
156 const std::string& commandLineParameters =
"");
Owns every start and stop of one application - nothing else may launch or signal it.
StopStrategyPtr getStopStrategy(Data_Structure::ScenarioPtr scenario)
void restartScenario(Data_Structure::ScenarioPtr scenario, bool printOnly=false)
Restarts a scenario.
void setDefaultStarter(ApplicationStarterPtr appStarter)
Sets the appStarter this Executor uses to start applications and request statuses.
static void loadAndSetCachedProperties(Data_Structure::ApplicationPtr application, std::string path, bool reload=false, bool set=true)
Generates an XML file of the given application and saves it in the specified path.
std::string getApplicationStatus(Data_Structure::ApplicationInstancePtr application)
Returns the status of an application.
void waitForScenario(const Data_Structure::ScenarioPtr &scenario)
Blocks until no application of the scenario has an operation requested or running.
void restartApplication(Data_Structure::ApplicationInstancePtr application, bool printOnly=false)
Requests that an application be restarted.
void startScenario(Data_Structure::ScenarioPtr scenario, bool printOnly=false, const std::string &commandLineParameters="")
Starts a scenario.
Executor(StopStrategyPtr strategy, ApplicationStarterPtr starter)
Constructor that sets StopStrategy and ApplicationStarter.
void stopScenario(Data_Structure::ScenarioPtr scenario)
Stops a scenario.
void setDefaultStopStrategy(StopStrategyPtr strategy)
Sets the strategy this Executor uses to stop applications.
void startApplication(Data_Structure::ApplicationInstancePtr application, bool printOnly=false, const std::string &commandLineParameters="")
Requests that an application be started.
void stopApplication(Data_Structure::ApplicationInstancePtr application)
Requests that an application be stopped.
StopStrategyPtr getDefaultStopStrategy()
void setStarter(ApplicationStarterPtr appStarter, Data_Structure::ScenarioPtr scenario)
ApplicationStarterPtr getStarter(Data_Structure::ScenarioPtr scenario)
void setStopStrategy(StopStrategyPtr strategy, Data_Structure::ScenarioPtr scenario)
void waitForApplication(const Data_Structure::ApplicationInstancePtr &application)
Blocks until the application has no operation requested or running any more.
Interface for classes that define how an application get stopped.
std::shared_ptr< Scenario > ScenarioPtr
Intent
What the ScenarioManager is currently trying to do with an application.
std::shared_ptr< Application > ApplicationPtr
std::shared_ptr< ApplicationInstance > ApplicationInstancePtr
std::shared_ptr< Executor > ExecutorPtr
std::shared_ptr< StopStrategy > StopStrategyPtr
std::shared_ptr< ApplicationStarter > ApplicationStarterPtr
std::shared_ptr< ApplicationLifecycle > ApplicationLifecyclePtr