edu.mit.ai.psg.traveler
Class CallRecordObservable

java.lang.Object
  |
  +--edu.mit.ai.psg.traveler.ActivityRecordBase
        |
        +--edu.mit.ai.psg.traveler.SynchronizationRecordDefault
              |
              +--edu.mit.ai.psg.traveler.CallRecordDefault
                    |
                    +--edu.mit.ai.psg.traveler.CallRecordObservable

public class CallRecordObservable
extends CallRecordDefault
implements ObservableRecord

Extends CallRecordDefault to support ChangeObservers.

See Also:
ActivityRecordObservableBase, TraceRecorderDefault.invoking(java.lang.Object, java.lang.reflect.Member, java.lang.Object[])

Inner classes inherited from class edu.mit.ai.psg.traveler.SynchronizationRecordDefault
SynchronizationRecordDefault.Entry, SynchronizationRecordDefault.Exit
 
Fields inherited from class edu.mit.ai.psg.traveler.CallRecordDefault
INCOMPLETE, myParameters, result, resultState, RETURNED_VALUE, RETURNED_VOID, THREW_EXCEPTION, waitMethods
 
Fields inherited from class edu.mit.ai.psg.traveler.SynchronizationRecordDefault
myMember, myTargetNow, myTargetThen
 
Fields inherited from class edu.mit.ai.psg.traveler.ActivityRecordBase
parent
 
Constructor Summary
CallRecordObservable(Object target, Member member, Object[] parameters)
           
 
Method Summary
 void addChangeObserver(ChangeObserver observer)
          arrange to be notified as follows: call completed or parent set: observer.notifyChanged(thisRecord)
child added: observer.notifyAdded(thisRecord, childRecord)
 void addChild(ActivityRecord child)
          add child to this parent's children, and set child's parent to this
 void addSynchronizationChild(SynchronizationRecord childRecord)
          add record of nested/recursive call for synchronization e.g., a nested synchronized block or wait.
 boolean isReadOnly()
          may be used to avoid constructing change observers for records that will never change.
 void recordReturned(Object value)
          Record that call completed by returning value
 void recordReturnedVoid()
          Record that call completed by returning void
 void recordThrew(Throwable thrown)
          Record that call completed by throwing thrown
 void removeChangeObserver(ChangeObserver observer)
           
 void setParent(ActivityRecord parentRecord)
          called by addChild
 void setSynchronizationParent(SynchronizationRecord parentRecord)
          called by addSynchronizationChild(edu.mit.ai.psg.traveler.SynchronizationRecord)
 
Methods inherited from class edu.mit.ai.psg.traveler.CallRecordDefault
getParameters, getResult, invocationString, isComplete, isCompleteByReturn, isCompleteByReturnVoid, isCompleteByThrow, isSynchronized, isSynchronizedWait, resultString, toString
 
Methods inherited from class edu.mit.ai.psg.traveler.SynchronizationRecordDefault
addSynchronizationEntry, addSynchronizationExit, finished, getMember, getSynchronizationChildren, getSynchronizationEntry, getSynchronizationExit, getSynchronizationParent, getTargetNow, getTargetThen, makeSynchronizationEntryRecord, makeSynchronizationExitRecord
 
Methods inherited from class edu.mit.ai.psg.traveler.ActivityRecordBase
addThreadedChild, cloneObject, ensureListValue, getChildren, getChildrenInThread, getParent, getProperty, getThreadedChildren, isFinished, putProperty, removeProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CallRecordObservable

public CallRecordObservable(Object target,
                            Member member,
                            Object[] parameters)
Method Detail

isReadOnly

public boolean isReadOnly()
Description copied from interface: ObservableRecord
may be used to avoid constructing change observers for records that will never change. If true, should never become false. (Often different from ActivityRecord.isFinished(), which only means the thread that created the activity record is finished with it, not that other threads are.)
Specified by:
isReadOnly in interface ObservableRecord

setParent

public void setParent(ActivityRecord parentRecord)
Description copied from interface: ActivityRecord
called by addChild
Overrides:
setParent in class ActivityRecordBase

addChild

public void addChild(ActivityRecord child)
Description copied from interface: ActivityRecord
add child to this parent's children, and set child's parent to this
Overrides:
addChild in class ActivityRecordBase
Tags copied from interface: ActivityRecord
See Also:
ActivityRecord.addThreadedChild(edu.mit.ai.psg.traveler.ActivityRecord)

recordReturnedVoid

public void recordReturnedVoid()
Description copied from interface: CallRecord
Record that call completed by returning void
Overrides:
recordReturnedVoid in class CallRecordDefault

recordReturned

public void recordReturned(Object value)
Description copied from interface: CallRecord
Record that call completed by returning value
Overrides:
recordReturned in class CallRecordDefault

recordThrew

public void recordThrew(Throwable thrown)
Description copied from interface: CallRecord
Record that call completed by throwing thrown
Overrides:
recordThrew in class CallRecordDefault

addSynchronizationChild

public void addSynchronizationChild(SynchronizationRecord childRecord)
Description copied from interface: SynchronizationRecord
add record of nested/recursive call for synchronization e.g., a nested synchronized block or wait. Calls childRecord.SynchronizationRecord.setSynchronizationParent(edu.mit.ai.psg.traveler.SynchronizationRecord)(this)
Overrides:
addSynchronizationChild in class SynchronizationRecordDefault

setSynchronizationParent

public void setSynchronizationParent(SynchronizationRecord parentRecord)
Description copied from interface: SynchronizationRecord
called by SynchronizationRecord.addSynchronizationChild(edu.mit.ai.psg.traveler.SynchronizationRecord)
Overrides:
setSynchronizationParent in class SynchronizationRecordDefault

addChangeObserver

public void addChangeObserver(ChangeObserver observer)
arrange to be notified as follows:
Specified by:
addChangeObserver in interface ObservableRecord

removeChangeObserver

public void removeChangeObserver(ChangeObserver observer)
Specified by:
removeChangeObserver in interface ObservableRecord

Copyright (c) 1996-1999
Massachusetts Institute of Technology

Feedback: jeva-feedback@ai.mit.edu