edu.mit.ai.psg.traveler
Interface ActivityRecord

All Known Subinterfaces:
CallRecord, SynchronizationRecord, SynchronizationRecord.Entry, SynchronizationRecord.Exit
All Known Implementing Classes:
ActivityRecordBase

public interface ActivityRecord

Interface for records of hierarchical activities with at most one parent and zero or more child subactivities.


Method Summary
 void addChild(ActivityRecord childRecord)
          add child to this parent's children, and set child's parent to this
 void addThreadedChild(ActivityRecord childRecord)
          add child (for activity which is running in another thread) to this parent's children, and set child's parent to this
 void finished()
          called when recording an activity has finished in this thread: may be used to save space when activity is done and nothing further will be added to record for this thread.
 Collection getChildren()
           
 List getChildrenInThread()
           
 ActivityRecord getParent()
           
 Collection getThreadedChildren()
           
 boolean isFinished()
          true if recording this record has finished for thread that created record; additions may still be made by other threads (e.g., #addThreadChild).
 void setParent(ActivityRecord parentRecord)
          called by addChild
 

Method Detail

getChildren

public Collection getChildren()
Returns:
records of activities enclosed in this activity. Child activities may be indirect callees if intermediate activities are not recorded. If all are activities of a single thread, then collection is a List, and iterator returns child activities in sequential order.

getChildrenInThread

public List getChildrenInThread()

getThreadedChildren

public Collection getThreadedChildren()

addChild

public void addChild(ActivityRecord childRecord)
add child to this parent's children, and set child's parent to this
See Also:
addThreadedChild(edu.mit.ai.psg.traveler.ActivityRecord)

addThreadedChild

public void addThreadedChild(ActivityRecord childRecord)
add child (for activity which is running in another thread) to this parent's children, and set child's parent to this
See Also:
addChild(edu.mit.ai.psg.traveler.ActivityRecord)

getParent

public ActivityRecord getParent()
Returns:
record of enclosing recorded activity, or null if none. Parent may be indirect caller if intermediate activities are not recorded.

setParent

public void setParent(ActivityRecord parentRecord)
called by addChild

finished

public void finished()
called when recording an activity has finished in this thread: may be used to save space when activity is done and nothing further will be added to record for this thread. However, if there are child theads adding records with addThreadedChild(edu.mit.ai.psg.traveler.ActivityRecord), they may continue to do so after the record is done in this thread.

isFinished

public boolean isFinished()
true if recording this record has finished for thread that created record; additions may still be made by other threads (e.g., #addThreadChild). Does not mean activity was successful, or that record is complete.

Copyright (c) 1996-1999
Massachusetts Institute of Technology

Feedback: jeva-feedback@ai.mit.edu