Apache log4cxx Version @version@
MapFilter Class Reference

A Filter that operates on a Map and can be used like in the following example: More...

#include <mapfilter.h>

Inheritance diagram for MapFilter:
Filter OptionHandler ObjectImpl Object Object

Public Member Functions

 MapFilter ()
 
virtual void setOption (const LogString &option, const LogString &value)
 Set options. More...
 
void setKeyValue (const LogString &strKey, const LogString &strValue)
 
const LogStringgetValue (const LogString &strKey) const
 
void setAcceptOnMatch (bool acceptOnMatch1)
 
bool getAcceptOnMatch () const
 
bool getMustMatchAll () const
 
void setMustMatchAll (bool mustMatchAll1)
 
FilterDecision decide (const spi::LoggingEventPtr &event) const
 Returns NEUTRAL is there is no string match. More...
 
- Public Member Functions inherited from Filter
 Filter ()
 
void addRef () const
 
void releaseRef () const
 
log4cxx::spi::FilterPtr getNext () const
 
void setNext (const log4cxx::spi::FilterPtr &newNext)
 
void activateOptions (log4cxx::helpers::Pool &p)
 Usually filters options become active when set. More...
 
void setOption (const LogString &option, const LogString &value)
 Set option to value. More...
 
virtual FilterDecision decide (const LoggingEventPtr &event) const =0
 
- Public Member Functions inherited from OptionHandler
virtual ~OptionHandler ()
 
virtual void activateOptions (log4cxx::helpers::Pool &p)=0
 Activate the options that were previously set with calls to option setters. More...
 
virtual void setOption (const LogString &option, const LogString &value)=0
 Set option to value. More...
 
- Public Member Functions inherited from Object
virtual const helpers::ClassgetClass () const
 
virtual ~Object ()
 
virtual void addRef () const =0
 
virtual void releaseRef () const =0
 
virtual bool instanceof (const Class &clazz) const =0
 
virtual const void * cast (const Class &clazz) const =0
 
- Public Member Functions inherited from ObjectImpl
 ObjectImpl ()
 
virtual ~ObjectImpl ()
 
void addRef () const
 
void releaseRef () const
 

Additional Inherited Members

- Public Types inherited from Filter
enum  FilterDecision { DENY = -1 , NEUTRAL = 0 , ACCEPT = 1 }
 
- Static Public Member Functions inherited from Object
static const helpers::ClassgetStaticClass ()
 
static const log4cxx::helpers::ClassRegistrationregisterClass ()
 
- Protected Attributes inherited from ObjectImpl
unsigned int volatile ref
 

Detailed Description

A Filter that operates on a Map and can be used like in the following example:

<filter class="MapFilter">
    <param name="user.ip"       value="127.0.0.1" />
    <param name="user.name"     value="test2"     />
    <param name="Operator"      value="AND"       />
    <param name="AcceptOnMatch" value="false"     />
</filter>

Constructor & Destructor Documentation

◆ MapFilter()

MapFilter ( )

Member Function Documentation

◆ decide()

FilterDecision decide ( const spi::LoggingEventPtr event) const
virtual

Returns NEUTRAL is there is no string match.

Implements Filter.

◆ getAcceptOnMatch()

bool getAcceptOnMatch ( ) const
inline

◆ getMustMatchAll()

bool getMustMatchAll ( ) const
inline

◆ getValue()

const LogString & getValue ( const LogString strKey) const
inline

◆ setAcceptOnMatch()

void setAcceptOnMatch ( bool  acceptOnMatch1)
inline

◆ setKeyValue()

void setKeyValue ( const LogString strKey,
const LogString strValue 
)
inline

◆ setMustMatchAll()

void setMustMatchAll ( bool  mustMatchAll1)
inline

◆ setOption()

virtual void setOption ( const LogString option,
const LogString value 
)
virtual

Set options.

Implements OptionHandler.


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