ITPub博客

首页 > Linux操作系统 > Linux操作系统 > SAX Uses Observer Pattern

SAX Uses Observer Pattern

原创 Linux操作系统 作者:rainwly0819 时间:2008-03-31 13:33:14 0 删除 编辑

[1] Pattern Overview

The observer pattern defines an one-to-many dependency between a subject object and any number observer objects so that when the subject object changes state, all its observers are notified and updated accordingly.

The Observer Pattern is also known as Dependents and Publishe-Subscribe.

[2] SAX uses the Observer Pattern. But only one Observer allowed.

XMLReader plays the role of Subject [ Subject - XMLReader].

org.xml.sax.ContentHandler interface plays the role of Observer [ Observer - Contenthandler]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/8585387/viewspace-220361/,如需转载,请注明出处,否则将追究法律责任。

上一篇: To be 'selfish'
请登录后发表评论 登录
全部评论

注册时间:2008-03-24

  • 博文量
    15
  • 访问量
    9039