Public Member Functions | Protected Attributes

fawkes::ConfigurableAspect Class Reference
[Fawkes Thread Aspects]

Thread aspect to access configuration data. More...

#include <>>

Inheritance diagram for fawkes::ConfigurableAspect:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~ConfigurableAspect ()
 Virtual empty Destructor.
void init_ConfigurableAspect (Configuration *config)
 Set the configuration It is guaranteed that this is called for a configurable thread before Thread::start() is called (when running regularly inside Fawkes).

Protected Attributes

Configurationconfig
 This is the Configuration member used to access the configuration.

Detailed Description

Thread aspect to access configuration data.

Give this aspect to your thread to gain access to the configuration. This aspects defines a thread as being configurable. It is guaranteed that if used properly from within plugins that setConfiguration() is called before the thread is started and that you can access the configuration via the config member.

It is higly recommended to also implement ConfigurationChangeHandler to get notified about configuration changes as soon as they happen. All threads which are configurable shall react immediately to config changes and use the new configuration. Therefore all inner structures shall be updated as necessary and member reinitialized if needed. Only this way no restart or at least plugin load/unload cycle is needed anymore to change the configuration. This should tremendously help to decrease debugging, testing and parameter tuning time!

Author:
Tim Niemueller

Definition at line 31 of file configurable.h.


Constructor & Destructor Documentation

fawkes::ConfigurableAspect::~ConfigurableAspect (  )  [virtual]

Virtual empty Destructor.

Definition at line 57 of file configurable.cpp.


Member Function Documentation

void fawkes::ConfigurableAspect::init_ConfigurableAspect ( Configuration config  ) 

Set the configuration It is guaranteed that this is called for a configurable thread before Thread::start() is called (when running regularly inside Fawkes).

Parameters:
config Configuration instance to use.

Definition at line 68 of file configurable.cpp.

Referenced by fawkes::AspectIniFin::init().


Member Data Documentation

This is the Configuration member used to access the configuration.

The configuration will remain valid for the whole lifetime of the thread.

Definition at line 39 of file configurable.h.


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