Class EventHandler.

Inherits Garbage. Inherited by Command, DeliveryAgent, EventMap, Fetcher, Flag, Granter, HelperRowCreator, ImapUrlFetcher, Injector, ManageSieveCommand, Permissions, PopCommand, RetentionSelector, SaslMechanism, Schema, SchemaChecker, SessionInitialiser, SessionPreloader, Sieve, SmtpCommand, SpoolManager, Threader and User.

An abstract base class for anything that wants event notifications.

Classes that want to be notified of events (e.g. the completion of a database query) must inherit from EventHandler and implement the execute() function.

Objects of that class may then pass their "this" pointers to code that promises to execute() them when the relevant even occurs.

There is currently no way to indicate the type or originator of an event. Furthermore, the Loop/Connection framework uses an entirely different scheme for event notifications.


Creates a new EventHandler object, and sets its arena to the current arena.

Reimplements Garbage::Garbage().

void EventHandler::execute()

This pure virtual function is called when there's something the EventHandler needs to do to process an event.

void EventHandler::log( const EString & m, Log::Severity s ) const

Logs the message m with severity s using this EventHandler's Log, as specified with setLog().

Log * EventHandler::log() const

Returns a pointer to this EventHandler's Log object, as inferred by the constructor or set with setLog().

void EventHandler::notify()

This is just a wrapper around execute() which sets a Scope with the event hander's own Log.

void EventHandler::setLog( Log * log )

Sets this object's Log to log.


Exists only to avoid compiler warnings.

This web page based on source code belonging to The Archiveopteryx Developers. All rights reserved.