LogService
libdadi: utility tools for distributed applications
Public Member Functions | List of all members
SimpleFilterManager Class Reference

#include <SimpleFilterManager.hh>

Inheritance diagram for SimpleFilterManager:
Inheritance graph
[legend]
Collaboration diagram for SimpleFilterManager:
Collaboration graph
[legend]

Public Member Functions

 SimpleFilterManager (ToolList *toolList, ComponentList *compList, tag_list_t *stateTags)
 
void toolConnect (const char *toolName, ToolList::ReadIterator *iter)
 
void toolDisconnect (const char *toolName, ToolList::ReadIterator *iter)
 
void addFilter (const char *toolName, const char *filterName, ToolList::ReadIterator *iter)
 
void removeFilter (const char *toolName, const char *filterName, ToolList::ReadIterator *iter)
 
virtual void flushAllFilters (const char *toolName, ToolList::ReadIterator *iter)
 
tag_list_tcomponentConnect (const char *componentName, ComponentList::ReadIterator *iter)
 
void componentDisconnect (const char *componentName, ComponentList::ReadIterator *iter)
 
void sendMessageWithFilters (log_msg_t *message)
 

Detailed Description

Simple implementation of the FilterManagerInterface Mainly offers empty functions to make testers compile/run

Constructor & Destructor Documentation

SimpleFilterManager::SimpleFilterManager ( ToolList toolList,
ComponentList compList,
tag_list_t stateTags 
)

Create a SimpleFilterManager.

Parameters
toolListThe ToolList to use
compListThe ComponentList to use
stateTagsA list of all Tags that are important for the system state and must always be sent. The FilterManager copies this list and does not take its ownership.

Member Function Documentation

void SimpleFilterManager::addFilter ( const char *  toolName,
const char *  filterName,
ToolList::ReadIterator iter 
)
virtual

Notify the manager that a new filter has been added. the filter must already exist in the toollist. A iterator used for inserting should be passed.

Implements FilterManagerInterface.

tag_list_t* SimpleFilterManager::componentConnect ( const char *  componentName,
ComponentList::ReadIterator iter 
)
virtual

Notify the manager that a component has connected The component should be already in the list, the corresponding iterator should be passed.

Implements FilterManagerInterface.

void SimpleFilterManager::componentDisconnect ( const char *  componentName,
ComponentList::ReadIterator iter 
)
virtual

Notify the manager that a component will disconnect. This must happen right before the deletion of the component. The iterator passed should be the same iterator used for deleting.

Implements FilterManagerInterface.

virtual void SimpleFilterManager::flushAllFilters ( const char *  toolName,
ToolList::ReadIterator iter 
)
virtual

Notify the manager that all filters for a certain tool will be removed. The filtermanager might implement this more efficient that removing each filter one by one.

Implements FilterManagerInterface.

void SimpleFilterManager::removeFilter ( const char *  toolName,
const char *  filterName,
ToolList::ReadIterator iter 
)
virtual

Notify the manager that a filter will be removed. This function should be called right before deleting the filter. The iterator for deleting the filter should be passed.

Implements FilterManagerInterface.

void SimpleFilterManager::sendMessageWithFilters ( log_msg_t message)
virtual

Forwards a message to all interested Tools. The message will be checked and stored in the outBuffer of all tools with a matching filter.

Implements FilterManagerInterface.

void SimpleFilterManager::toolConnect ( const char *  toolName,
ToolList::ReadIterator iter 
)
virtual

Notify the manager that a new tool has connected. The Tool must already exist in the toolList. iter must be an ReadIterator to the toolList. It should be the same iterator that was used for inserting the tool.

Implements FilterManagerInterface.

void SimpleFilterManager::toolDisconnect ( const char *  toolName,
ToolList::ReadIterator iter 
)
virtual

Notify the manager that a tool is about to disconnect. This function must be called right before deleting the tool from the list, as Filtermanager will delete all its internal data on this tool (including remaining filters). The iterator passed should be the iterator used for deleting the tool.

Implements FilterManagerInterface.


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