Container Thread Start-up hook. More...
#include <maciContainerThreadHook.h>
Public Member Functions | |
ContainerThreadHook () | |
virtual | ~ContainerThreadHook () |
virtual void | initThread (void *arg) |
virtual ACE_THR_FUNC_RETURN | start (ACE_THR_FUNC func, void *arg) |
Container Thread Start-up hook.
ContainerThreadHook class provides the default thread initialization for all threads that are going to be created inside the container. It implements the start() method from ACE_Thread_Hook, which is called before the thread is executed. The default thread initialization initializes the logging system. If someone wants to change the default thread initialization, she/he has to override the initThread() method and instatiate the object. After this all threads will be initialized using new functionally. It is recommended that ContainerThreadHook::initThread() method is called from the overridden method to get logging system initialized. This hook is set by creating ContainerThreadHook object at the container instantiation.
maci::ContainerThreadHook::ContainerThreadHook | ( | ) | [inline] |
Constructor of ContainerThreadHook which registers the hook
virtual maci::ContainerThreadHook::~ContainerThreadHook | ( | ) | [inline, virtual] |
virtual destructor of ContainerThreadHook
virtual void maci::ContainerThreadHook::initThread | ( | void * | arg | ) | [virtual] |
Actual implementation of thread initialization, which provides the logging system initialization. This function is called from the start() method. If someone wants to change default threads' start-up functionallty he/she has to override this method. It is recommended that overriden method calls this one, i.e. ContainerThreadHook::initThread();
arg | parameter that is passed to the thread |
Referenced by start().
virtual ACE_THR_FUNC_RETURN maci::ContainerThreadHook::start | ( | ACE_THR_FUNC | func, | |
void * | arg | |||
) | [inline, virtual] |
Implementation of virtual start method from ACE_Thread_Hook, which is called before the thread is executed. The implemntation just calls initThread.
func | thread function | |
arg | thread parameter |
References initThread().