org.erights.e.elib.slot
Interface EverReactor


public interface EverReactor

Untamed:


Method Summary
 void reactToUpdate(Object newValue, BigInteger newReporterGen, EverReporter optNewReporter)
          Enabled: A report from an EverReporter that newValue is current as of generation number newReporterGen of optNewReporter's local numbering.
 

Method Detail

reactToUpdate

public void reactToUpdate(Object newValue,
                          BigInteger newReporterGen,
                          EverReporter optNewReporter)
Enabled: A report from an EverReporter that newValue is current as of generation number newReporterGen of optNewReporter's local numbering.

optNewReporter is typically, but not necessarily, the same reporter we subscribed to. When we re-subscribe, we should subscribe with optNewReporter, as that is the reporter we should use according to our original reporter. If we're not trying to subscribe persistently, this means we don't need to remember who we subscribed to once we send off a subscription request.

If this Reactor is also a Reporter (with further downstream Reactors), then, on receiving this report, it should in turn report to its subscribers. A non-empty set of subscribers is an expression of local interest, as is a EverReporter.getValue() request.

If this is a forever-reactor, then it will react to the report by immediately re-subscribing to optNewReporter. If this is a whenever-reactor, then it will delay the re-subscribe request until there's an expression of local interest.

Parameters:
optNewReporter - If null, then this EverReactor has been cut loose -- this last newValue is now authoritative since there's no one upstream to ask.


comments?