Safir SDK Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Safir::Application::BackdoorKeeper Class Reference

Class that provides subscription and filtering for BackdoorCommands. More...

#include <Safir/Application/BackdoorKeeper.h>

Inheritance diagram for Safir::Application::BackdoorKeeper:
Collaboration diagram for Safir::Application::BackdoorKeeper:

Public Member Functions

 BackdoorKeeper (const Safir::Dob::ConnectionBase &connection)
 Constructor. More...
 
virtual ~BackdoorKeeper ()
 Destructor. More...
 
void Start (Safir::Application::Backdoor &backdoor)
 Starts subscription for backdoor commands to be sent to the Backdoor. More...
 
void Stop ()
 Stops subscription for backdoor commands. More...
 
bool IsStarted () const
 Check if the backdoor keeper has been started. More...
 
- Public Member Functions inherited from Safir::Dob::MessageSubscriber
virtual ~MessageSubscriber ()
 Virtual destructor is needed since we have virtual member functions. More...
 
- Public Member Functions inherited from Safir::Dob::Internal::ConsumerBase
virtual ~ConsumerBase ()
 

Detailed Description

Class that provides subscription and filtering for BackdoorCommands.

Use this class to "keep" the Backdoor. After Start is called your Backdoor will be called every time there is a Command aimed for the given connection.

Constructor & Destructor Documentation

Safir::Application::BackdoorKeeper::BackdoorKeeper ( const Safir::Dob::ConnectionBase connection)
explicit

Constructor.

Parameters
connection[in] The connection on which the keeper will subscribe to backdoor messages.
virtual Safir::Application::BackdoorKeeper::~BackdoorKeeper ( )
virtual

Destructor.

Member Function Documentation

bool Safir::Application::BackdoorKeeper::IsStarted ( ) const

Check if the backdoor keeper has been started.

Returns
true if the keeper is started.
void Safir::Application::BackdoorKeeper::Start ( Safir::Application::Backdoor backdoor)

Starts subscription for backdoor commands to be sent to the Backdoor.

The connection that was passed in the constructor must be opened before Start is called.

If the connection is closed and opened again (maybe in a different context) this method must be called again to establish the subscription.

The class supports restarting/pausing by calling stop and then start again.

Parameters
backdoor[in] - Class that implements the Backdoor interface.
Exceptions
Safir::Dob::NotOpenException'Start' was called before connect to Dob.
void Safir::Application::BackdoorKeeper::Stop ( )

Stops subscription for backdoor commands.

The backdoor can be started again by calling start after it has been stopped.