Dedian  
          -- 關(guān)注搜索引擎的開發(fā)
          日歷
          <2006年5月>
          30123456
          78910111213
          14151617181920
          21222324252627
          28293031123
          45678910
          統(tǒng)計
          • 隨筆 - 82
          • 文章 - 2
          • 評論 - 228
          • 引用 - 0

          導(dǎo)航

          常用鏈接

          留言簿(8)

          隨筆分類(45)

          隨筆檔案(82)

          文章檔案(2)

          Java Spaces

          搜索

          •  

          積分與排名

          • 積分 - 65579
          • 排名 - 817

          最新評論

          閱讀排行榜

          評論排行榜

           
          Purpose:

          Encapsulate a set of objects which interact with each other. The benefit to do this is keeping objects from communicating with each other directly. All the messages between objects should be sent to mediator at first and then mediator will control and coordinate those interaction. Also, mediator can handle external interaction request and decide which object to response the external request.

          Structure:

          star topology: Mediator class is as a hub which connects to a set of classes (colleague classes).

          Difference from Facade Pattern:

          Facade differs from Mediator in that it abstracts a subsystem of objects to provide a more convenient interface. Its protocol is unidirectional. That is, Facade objects make requests of the subsystem classes but not vice versa. In contrast, Mediator enables cooperative behavior that colleague objects don't or can't provide, and the protocol is multidirectional.

          reference:

          Gamma, E., R. Helm, R. Johnson, J. Vlissides (1995). Design Patterns. Addison Wesley. ISBN 0.201-63361-2
          http://sern.ucalgary.ca/courses/seng/443/W02/assignments/Mediator/
          http://my.execpc.com/~gopalan/design/behavioral/mediator/mediator.html
          posted on 2006-05-12 03:24 Dedian 閱讀(302) 評論(0)  編輯  收藏 所屬分類: Design Patterns
           
          Copyright © Dedian Powered by: 博客園 模板提供:滬江博客
          主站蜘蛛池模板: 社旗县| 全椒县| 噶尔县| 准格尔旗| 宁安市| 中宁县| 长宁区| 郴州市| 同仁县| 五台县| 湖南省| 綦江县| 上思县| 博白县| 罗山县| 开化县| 南昌市| 浙江省| 鄂尔多斯市| 望城县| 布尔津县| 深泽县| 旺苍县| 清流县| 邢台县| 繁昌县| 普格县| 大港区| 临清市| 宁陕县| 高阳县| 潍坊市| 龙山县| 台南县| 彩票| 商都县| 隆化县| 太白县| 名山县| 余庆县| 廉江市|