文件名称:Observer_Pattern_1
- 所属分类:
- JSP源码/Java
- 资源属性:
- [Java] [源码]
- 上传时间:
- 2013-05-27
- 文件大小:
- 10kb
- 下载次数:
- 0次
- 提 供 者:
- l***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
观察者模式(别名:依赖,发布-订阅)
定义对象间的一种一对多的依赖关系,当一个对象的状态发生变化时,所有依赖它的对象都得到通知并被自动更新。
观察者模式是关于多个对象想知道一个对象中数据变化的情况的一种成熟的模式。观察者模式中有一个称作”主题“的对象和若干个称作”观察者“的对象,”主题“和”观察者“间是一种一对多的依赖关系,当”主题“的状态发生变化时,所有”观察者“都得到通知。前面的例子中,”求职中心”相当于观察者模式中的一个具体“主题”;每个“求职者”相当于观察者模式中的一个具体“观察者”。
-Observer pattern (alias: dependency, publish- subscribe) defines the objects of a many dependency relationship, when an object' s state changes, all objects that depend on it have been notified and updated automatically. Observer pattern wondering about the plurality of objects in an object data in the case of changing a mature model. Observer pattern called a " subject" of the object and a number called an " observer" object, " Subject" , and " observer" is an inter-many dependencies, when the " subject" state changes, all the " observer" are notified. The previous example, the " job center" corresponds to a particular observer mode " Subject" each " job" is equivalent to a specific viewer mode " observer."
定义对象间的一种一对多的依赖关系,当一个对象的状态发生变化时,所有依赖它的对象都得到通知并被自动更新。
观察者模式是关于多个对象想知道一个对象中数据变化的情况的一种成熟的模式。观察者模式中有一个称作”主题“的对象和若干个称作”观察者“的对象,”主题“和”观察者“间是一种一对多的依赖关系,当”主题“的状态发生变化时,所有”观察者“都得到通知。前面的例子中,”求职中心”相当于观察者模式中的一个具体“主题”;每个“求职者”相当于观察者模式中的一个具体“观察者”。
-Observer pattern (alias: dependency, publish- subscribe) defines the objects of a many dependency relationship, when an object' s state changes, all objects that depend on it have been notified and updated automatically. Observer pattern wondering about the plurality of objects in an object data in the case of changing a mature model. Observer pattern called a " subject" of the object and a number called an " observer" object, " Subject" , and " observer" is an inter-many dependencies, when the " subject" state changes, all the " observer" are notified. The previous example, the " job center" corresponds to a particular observer mode " Subject" each " job" is equivalent to a specific viewer mode " observer."
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Observer_Pattern_1\.classpath
..................\.project
..................\.settings\org.eclipse.jdt.core.prefs
..................\bin\com\observer\HaiGuiImpl.class
..................\...\...\........\IObserver.class
..................\...\...\........\UniversityStudentImpl.class
..................\...\...\subject\ISubject.class
..................\...\...\.......\SeekJobCenterImpl.class
..................\...\...\test\Application.class
..................\src\com\observer\HaiGuiImpl.java
..................\...\...\........\IObserver.java
..................\...\...\........\UniversityStudentImpl.java
..................\...\...\subject\ISubject.java
..................\...\...\.......\SeekJobCenterImpl.java
..................\...\...\test\Application.java
..................\bin\com\observer
..................\...\...\subject
..................\...\...\test
..................\src\com\observer
..................\...\...\subject
..................\...\...\test
..................\bin\com
..................\src\com
..................\.settings
..................\bin
..................\src
Observer_Pattern_1