IntroductionPyela has a simple an elegant event framework. Its aim is to bridge the dependency gap between the different components within Pyela; to allow various functionality to react to actions from the network layer without them knowing of each other. Overview: the basic APIThere are three main concepts within the Pyela event API: - Events - describe an action or something that's happened; events require a descriptor - an EventType
- EventHandler - these act on events and perform tasks when they're raised; an example would be an EventHandler implementation that writes all RAW_TEXT packets to a log file
- EventManager - ties Events and EventHandlers together; an event manager will be told when an event is raised and pass the message onto the relevant EventHandler
More to come, first draft
|