|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--edu.mit.ai.psg.traveler.TraceRecorderDefault
|
+--edu.mit.ai.psg.traveler.TraceRecorderObservable
An alternate trace recorder that produces observable call records and
provides means to observe additions to biographies.
Use this instead of TraceRecorderDefault when you want to
observe the records while the program is in progress (e.g., so a
display can be notified and updated when new items are added to
biography, or new children are added to an activity or call).
Observable recording does more work to track and notify observers
as additions are made, so it is less efficient than default recording.
TraceRecorderObservable overrides TraceRecorderDefault, to create
CallRecordObservable instead of CallRecordDefault.
It also implements ObservableBiographyRecorder so that biographies
can be observed.
Caution:TraceRecorderObservable should not be used if any
object's toString method (or any method called by its toString() method)
traces synchronization, because it will cause an endless cycle:
displaying its biography will generate calls to its toString()
method, which will cause the biography to be extended, which will trigger
calling the toString method again...
Trace,
TraceRecorder| Constructor Summary | |
TraceRecorderObservable()
|
|
| Method Summary | |
void |
addBiographyObserver(Object target,
ChangeObserver observer)
arrange to be notified as follows: record added to target's biography: observer.notifyAdded(target, record)
|
void |
addEntryToBiography(SynchronizationRecord record)
augmented to inform biography observers that target biography changed. |
void |
addExitToBiography(SynchronizationRecord record)
augmented to inform biography observers that target biography changed. |
protected void |
fireBiographyObservers(Object target,
ActivityRecord record)
|
boolean |
isReadOnly(Object target)
returns false; any Object can be target of synchronized block and a target of biography by this TraceRecorderObservable |
protected CallRecord |
makeCallRecord(Object target,
Member member,
Object[] parameters)
Creates a CallRecordObservable |
protected ActivityRecord |
makeStringRecord(String string)
Creates a StringRecordObservable |
protected SynchronizationRecord |
makeSynchronizationRecord(Object target,
Member member)
Creates a SynchronizationRecordObservable |
void |
removeBiographyObserver(Object target,
ChangeObserver observer)
|
| Methods inherited from class edu.mit.ai.psg.traveler.TraceRecorderDefault |
beganSynchronization,
beginning,
clearBiographies,
clearBiography,
clearSynchronizationHolders,
doing,
doing,
enteredSynchronization,
entering,
exitting,
getBiography,
getCurrentRecord,
getSynchronizationHolder,
getThreadOutermostRecord,
invoking,
received,
returning,
returningVoid,
setCurrentRecord,
throwing |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public TraceRecorderObservable()
| Method Detail |
protected CallRecord makeCallRecord(Object target,
Member member,
Object[] parameters)
CallRecordObservable
protected SynchronizationRecord makeSynchronizationRecord(Object target,
Member member)
SynchronizationRecordObservableprotected ActivityRecord makeStringRecord(String string)
StringRecordObservable
public void addBiographyObserver(Object target,
ChangeObserver observer)
observer.notifyAdded(target, record)
public void removeBiographyObserver(Object target,
ChangeObserver observer)
protected void fireBiographyObservers(Object target,
ActivityRecord record)
public boolean isReadOnly(Object target)
public void addEntryToBiography(SynchronizationRecord record)
TraceRecorder.addEntryToBiography(edu.mit.ai.psg.traveler.SynchronizationRecord)public void addExitToBiography(SynchronizationRecord record)
TraceRecorder.addExitToBiography(edu.mit.ai.psg.traveler.SynchronizationRecord)
|
Copyright (c) 1996-1999 Massachusetts Institute of Technology Feedback: jeva-feedback@ai.mit.edu |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||