Bug 1542 - Selectively adding task observers, when an Object implements multiple interfaces broken
Summary: Selectively adding task observers, when an Object implements multiple interfa...
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P1 normal
Target Milestone: ---
Assignee: Andrew Cagney
Depends on: 3987
Blocks: 1519 1533
  Show dependency treegraph
Reported: 2005-10-25 14:31 UTC by Andrew Cagney
Modified: 2005-10-29 17:17 UTC (History)
2 users (show)

See Also:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Cagney 2005-10-25 14:31:08 UTC
Sigh, seems the way I thought interface worked isn't.  I'll need to tweak the
internals.  If I understand Sami's comment correctly, having individual
.requestAddTerminatingObserver et.al. interfaces would also be prefered?
Comment 1 Sami Wagiaalla 2005-10-25 14:48:00 UTC
having requestAddXObserver would catch mistakes at compile time, amongst other
benefits yes. 
Comment 2 Andrew Cagney 2005-10-25 21:29:21 UTC
Completly refactored, note though that I had some problems with the GUI code - I
suspect some of the objects are missing interfaces.

Index: frysk-core/frysk/proc/ChangeLog
2005-10-25  Andrew Cagney  <cagney@redhat.com>

        * TaskObservable.java: New file.
        * TestTaskTerminateObserver.java, TestTaskForkedObserver.java,
        TestTaskClonedObserver.java, TestProcGet.java, TestModify.java:
        * TestLib.java: Make .TaskObserverBase abstract adding .updateTask
        method; have it register itself as a task-added observer.  Delete
        * TaskState.java: Update .processRequestAddObserver, and
        .processRequestDeleteObserver to take a TaskObservable.
        * Task.java: Add .clonedObservers, .requestAddClonedObserver,
        requestDeleteClonedObserver, .attachedObservers,
        .requestAddAttachedObserver, .requestDeleteAttachedObserver,
        .forkedObservers, .requestAddForkedObserver,
        .requestDeleteForkedObserver, .terminatedObservers,
        .requestAddTerminatedObserver, .requestDeleteTerminatedObserver,
        .terminatingObservers, .requestAddTerminatingObserver,
        .requestDeleteTerminatingObserver, .execedObservers,
        .requestAddExecedObserver, .requestDeleteExecedObserver.  Make
        .requestAddObserver, and .requestDeleteObserver private.

Index: frysk-gui/frysk/gui/monitor/ChangeLog
2005-10-25  Andrew Cagney  <cagney@redhat.com>

        * ActionPool.java: Replace calls to Task .requestAddObserver, and
        .requestDeleteObserver with either a call to
        .requestAddExecedObserver, .requestDeleteExecedObserver,
        .requestAddTerminatingObsever, .requestDeleteTerminatingObserver,
        .requestAddForkedObserver, .requestDeleteForkedObserver,
        .requestAddClonedObserver, .requestDeleteClonedObserver, or a
        RuntimeException throw.