frysk.proc.live
Class TestTaskObserverCode.SignaledObserver

java.lang.Object
  extended by frysk.proc.live.TestTaskObserverCode.SignaledObserver
All Implemented Interfaces:
Observer, TaskObserver, TaskObserver.Signaled
Enclosing class:
TestTaskObserverCode

private static class TestTaskObserverCode.SignaledObserver
extends Object
implements TaskObserver.Signaled


Nested Class Summary
 
Nested classes/interfaces inherited from interface frysk.proc.TaskObserver
TaskObserver.Cloned, TaskObserver.Code, TaskObserver.Execed, TaskObserver.Forked, TaskObserver.Instruction, TaskObserver.Signaled, TaskObserver.Syscalls, TaskObserver.Terminated, TaskObserver.Terminating, TaskObserver.Watch
 
Field Summary
(package private)  Signal sig
           
 
Constructor Summary
private TestTaskObserverCode.SignaledObserver()
           
 
Method Summary
 void addedTo(Object observable)
          Acknowledge the request to add this Observer from Object's set of observers was successful.
 void addFailed(Object observable, Throwable w)
          Notify that the attempt to add to the specified observer failed.
 void deletedFrom(Object observable)
          Acknowledge the request to delete this Observer from Object's set of observers was successful (or that the Observer was spontaneously deleted, e.g., due to a task exit).
 Action updateSignaled(Task task, Signal signal)
          The SIGNAL is pending delivery to the task.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sig

Signal sig
Constructor Detail

TestTaskObserverCode.SignaledObserver

private TestTaskObserverCode.SignaledObserver()
Method Detail

updateSignaled

public Action updateSignaled(Task task,
                             Signal signal)
Description copied from interface: TaskObserver.Signaled
The SIGNAL is pending delivery to the task. Return Action.BLOCK to block the task's further execution. XXX: This gets weird. At present and in theory, a client wanting to discard a signal would need to sequence the following: tell the task to scrub discard the signal; tell the task to remove this observer from the set of blockers; return Action.BLOCK so that this task is added to the set of blockers. Perhaps it would be better to always add an observer to the blocker pool and then require explict removal.

Specified by:
updateSignaled in interface TaskObserver.Signaled

addFailed

public void addFailed(Object observable,
                      Throwable w)
Description copied from interface: Observer
Notify that the attempt to add to the specified observer failed.

Specified by:
addFailed in interface Observer

addedTo

public void addedTo(Object observable)
Description copied from interface: Observer
Acknowledge the request to add this Observer from Object's set of observers was successful.

Specified by:
addedTo in interface Observer

deletedFrom

public void deletedFrom(Object observable)
Description copied from interface: Observer
Acknowledge the request to delete this Observer from Object's set of observers was successful (or that the Observer was spontaneously deleted, e.g., due to a task exit).

Specified by:
deletedFrom in interface Observer