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

Protected 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.

explicit  MessageHandler (const char* name, unsigned priority = 100, const char* trackName = 0, bool addPriority = true)

MessageHandler

Creates a new message handler.

Parameters:
nameName of the handled message - may be NULL
priorityPriority of the handler, 0 = top
trackNameName to be used in handler tracking
addPriorityTrue to append :priority to trackName

 ~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 String&  trackName ()

trackName

[const]

Retrieve the tracking name of this handler

Returns: Name that is to be used in tracking operation

inline void  trackName (const char* name)

trackName

Set a new tracking name for this handler. Works only if the handler was not yet inserted into a dispatcher

Parameters:
nameName that is to be used in tracking operation

inline const NamedString*  filter ()

filter

[const]

Retrieve 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

void  cleanup ()

cleanup

[protected]

Remove the handler from its dispatcher, remove any installed filter. This method is called internally from destruct and the destructor


Generated by: paulc on bussard on Fri Dec 21 16:28:34 2012, using kdoc 2.0a54.