StopAndKill Class Reference

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>

+ Inheritance diagram for StopAndKill:

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
virtual void removeApplication (Data_Structure::ApplicationInstancePtr application, StatusManager statusManager)
 
virtual void removeScenario (Data_Structure::ScenarioPtr scenario, StatusManager statusManager)
 
 StopStrategy (ApplicationStopperPtr stopper)
 

Additional Inherited Members

- Protected Attributes inherited from StopStrategy
ApplicationStopperPtr stopper
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ StopAndKill()

StopAndKill ( ApplicationStopperPtr  stopper,
int  delay 
)

Constructor that sets the ApplicationStopper used by this StopStrategy.

Parameters
stopperstopper used in this strategy
delaydelay between start and stop

Definition at line 34 of file StopAndKill.cpp.

Member Function Documentation

◆ getStopper()

ApplicationStopperPtr getStopper ( )

Returns the stopper used by this StopStrategy.

Returns
stopper used by this strategy

Definition at line 52 of file StopAndKill.cpp.

◆ stop()

void stop ( Data_Structure::ApplicationInstancePtr  application)
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)).

Parameters
applicationapplication to be stopped

Implements StopStrategy.

Definition at line 38 of file StopAndKill.cpp.


The documentation for this class was generated from the following files: