class MessageHandler

A message handler. More...

Contains pure virtuals
Full nameTelEngine::MessageHandler
Definition#include <yatengine.h>
InheritsTelEngine::String [public ]
Inherited byMessageRelay
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed Description

The purpose of this class is to hold a message received method that is called for matching messages. It holds as well the matching criteria and priority among other handlers.

 MessageHandler (const char* name, unsigned priority = 100)

MessageHandler

Creates a new message handler.

Parameters:
nameName of the handled message - may be NULL
priorityPriority of the handler, 0 = top

 ~MessageHandler ()

~MessageHandler

[virtual]

Handler destructor.

void  destruct ()

destruct

[virtual]

Destroys the object, performs cleanup first

Reimplemented from GenObject.

bool  received (Message& msg)

received

[pure virtual]

This method is called whenever the registered name matches the message.

Parameters:
msgThe received message

Returns: True to stop processing, false to try other handlers

inline unsigned  priority ()

priority

[const]

Find out the priority of the handler

Returns: Stored priority of the handler, 0 = top

inline const NamedString*  filter ()

filter

[const]

Retrive the filter (if installed) associated to this handler

void  setFilter (NamedString* filter)

setFilter

Set a filter for this handler

Parameters:
filterPointer to the filter to install, will be owned and destroyed by the handler

inline void  setFilter (const char* name, const char* value)

setFilter

Set a filter for this handler

Parameters:
nameName of the parameter to filter
valueValue of the parameter to filter

void  clearFilter ()

clearFilter

Remove and destroy any filter associated to this handler


Generated by: root on dragoshel on Sat Apr 14 01:50:50 2007, using kdoc 2.0a54.