Title: CIS 644 Tues. Nov. 23, 1999 W14A
1CIS 644 Tues. Nov. 23, 1999 W14A
Threads, Notification Chaps. 4, 5
2schedule 23 today 25 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
4Java Threads execute a "run" Runnable
interface "sync" shared operations
that access data about limited
resources thread priorities thread groups
5Coad factor sync'ed ops as small methods
"sync" comment on scenarios (p
186) Responsible Thread (p 191)
(stop, suspend states stop , suspend
methods deprecated)
6older 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
7communications UML operations events sig
nals a named object, thrown (exceptions) ca
lls (notification) timer state change
Chap 5 UI changes --gt PD. message PD
changes --gt UI.notice
83 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 --gt notice ob_er
get lt-- --/ 2 messages, but less overall msgs
!! less coupling
10Java p242 Observable class -(
Observer interface -( better solution p.
245 IObserver IObservable
ObservableComponent Charters ex. p. 251
115.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 -(
13Dataflow bus p. 275 http//java.sun.com/beans
/infobus/
14End