frysk.proc.live
Class TestTaskObserverCode.SignaledObserver
java.lang.Object
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
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 |
sig
Signal sig
TestTaskObserverCode.SignaledObserver
private TestTaskObserverCode.SignaledObserver()
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