Presentation is loading. Please wait.

Presentation is loading. Please wait.

CIS 644 Tues. Nov. 23, 1999 W14A … Threads, Notification Chaps. 4, 5.

Similar presentations


Presentation on theme: "CIS 644 Tues. Nov. 23, 1999 W14A … Threads, Notification Chaps. 4, 5."— Presentation transcript:

1 CIS 644 Tues. Nov. 23, 1999 W14A … Threads, Notification Chaps. 4, 5

2 schedule: 23: today25: thanksgiving 30: patterns 2: review, ?? 7: design proj 9: design proj email exam2

3 UML active objects lightweight … tasks, threads heavyweight.. processes bold boxes "concurrent" attribute for shared ops

4 Java: Threads … execute a "run" Runnable interface "sync" shared operations that access data about limited resources thread priorities thread groups

5 Coad: factor sync'ed ops as small methods "sync" comment on scenarios (p 186) Responsible Thread (p 191) (stop, suspend states; stop, suspend methods deprecated)

6 older languages, "monitor" with task queue on multiple methods; Java: thread queue on "run" bottleneck: p. 204, Mizuno talk use multiple adaptors: general … p. 206 Zoe with single thread: p.214 Zoe with priority threads with adaptors code p. 216-8, scenario p. 217

7 communications: UML: operations events signals… a named object, thrown (exceptions) calls …(notification) timer state change Chap 5: UI changes --> PD. message PD changes --> UI.notice

8 3 kinds of communication: (1) polling.. p. 224 … old, slow (2) timers … general, p. 227 ITimer.. the timer ITime … the listerer Charlie application, p. 231 (3) active notification

9 (3) active notification Pattern: Observable- observer p. 234 publisher - subscriber (Mac) model - view (Java) document - view (MS) Ob --> notice : ob_er get <-- --/ 2 messages, but less overall msgs !! less coupling

10 Java: p242 Observable class :-( Observer interface :-( better solution: p. 245 IObserver IObservable ObservableComponent Charters ex. p. 251

11 5.3.1 active notification … long section 5.3.2 Source-listener 5.3.3 Beans structure 5.3.4 Data bus 5.3.5 Model-view-control (Swing) 5.3.6 EJB structure

12 Beans ( and ActiveX) visual components: p. 269 components have properties, property-change-source "fires" a change, support notifies listeners see p. 272 :-(

13 Dataflow bus: p. 275 http://java.sun.com/beans/infobus/

14 End


Download ppt "CIS 644 Tues. Nov. 23, 1999 W14A … Threads, Notification Chaps. 4, 5."

Similar presentations


Ads by Google