|
First tries to stop, then kills an application, using the given ApplicationStopper. This StopStrategy first tries to stop an application. If after a certain period of time the application hasn't yet stopped, it tries to kill it. This StopStrategy can be made system-specific by switching out its ApplicationStopper. More...
#include <ArmarXCore/util/ScenarioManagerCommon/executor/StopAndKill.h>
Public Member Functions | |
ApplicationStopperPtr | getStopper () |
Returns the stopper used by this StopStrategy. More... | |
void | stop (Data_Structure::ApplicationInstancePtr application) override |
Stops an application. More... | |
StopAndKill (ApplicationStopperPtr stopper, int delay) | |
Constructor that sets the ApplicationStopper used by this StopStrategy. More... | |
Public Member Functions inherited from StopStrategy | |
StopStrategy (ApplicationStopperPtr stopper) | |
Additional Inherited Members | |
Protected Attributes inherited from StopStrategy | |
ApplicationStopperPtr | stopper |
First tries to stop, then kills an application, using the given ApplicationStopper. This StopStrategy first tries to stop an application. If after a certain period of time the application hasn't yet stopped, it tries to kill it. This StopStrategy can be made system-specific by switching out its ApplicationStopper.
Definition at line 41 of file StopAndKill.h.
StopAndKill | ( | ApplicationStopperPtr | stopper, |
int | delay | ||
) |
Constructor that sets the ApplicationStopper used by this StopStrategy.
stopper | stopper used in this strategy |
delay | delay between start and stop |
Definition at line 34 of file StopAndKill.cpp.
ApplicationStopperPtr getStopper | ( | ) |
Returns the stopper used by this StopStrategy.
Definition at line 52 of file StopAndKill.cpp.
|
overridevirtual |
Stops an application.
First tries to stop it, by calling (ApplicationStopper::stop(Data_Structure::ApplicationInstancePtr)), then waits for #timer seconds and then calls (ApplicationStopper::kill(Data_Structure::ApplicationInstancePtr)).
application | application to be stopped |
Implements StopStrategy.
Definition at line 38 of file StopAndKill.cpp.