• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 19. Events and Subscribers > The Theory Behind Events

The Theory Behind Events

Although this chapter has demonstrated a classical use of events from an application developer point of view, it is not quite the whole story. So far, you have discovered the use of the basic event system.

This chapter has not explained how Zope 3 uses this system. As mentioned before, the subscriber directive does not append the message mailer instance to the subscription list directly, as you may expect. Instead, it registers the message mailer as a “subscription adapter” that adapts an event by providing some event interface, such as IObjectModifiedEvent, to None, because it explicitly does not provide any special interface. The difference between regular and subscription adapters is that you can register several subscription adapters that have the same required and provided interfaces. When requested, all matching adapters are returned. This allows you to have multiple subscribers for an event.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint