Package com.framed.cdss.reactors
Class DislocationClassificationReactor
java.lang.Object
com.framed.core.Service
com.framed.arn.Reactor
com.framed.cdss.reactors.DislocationClassificationReactor
-
Nested Class Summary
Nested classes/interfaces inherited from class com.framed.arn.Reactor
Reactor.Snapshot -
Field Summary
Fields inherited from class com.framed.arn.Reactor
addressGroup, id, inputChannels, lastLogicalFireTs, outputChannelsFields inherited from class com.framed.core.Service
ADDRESS_REGISTRY_SUFFIX, eventBus, formatter, logger -
Constructor Summary
ConstructorsConstructorDescriptionDislocationClassificationReactor(EventBus eventBus, String id, String spo2TrendChannel, String etCO2LimitChannel, String sfLimitChannel, String outputChannel, boolean atomic) Constructs anReactorthat subscribes to the giveninputChannels, evaluates the providedfiringRules, and optionally exposesoutputChannels. -
Method Summary
Modifier and TypeMethodDescriptionvoidreactionFunction(Map<String, Object> latestSnapshot) Called once per evaluation cycle when any rule is satisfied.Methods inherited from class com.framed.arn.Reactor
getInputChannels, getOutputChannels, valueMatchesExpectedMethods inherited from class com.framed.core.Service
addressRegistry, announceAddress, stop
-
Constructor Details
-
DislocationClassificationReactor
public DislocationClassificationReactor(EventBus eventBus, String id, String spo2TrendChannel, String etCO2LimitChannel, String sfLimitChannel, String outputChannel, boolean atomic) Constructs anReactorthat subscribes to the giveninputChannels, evaluates the providedfiringRules, and optionally exposesoutputChannels.For each input channel, this actor:
- Initializes its sequence counter and latest value holder;
- Registers a message handler on the
EventBusthat updates state and evaluates rules.
During construction, rules are compiled to internal
FiringRules and validated for channel existence.- Parameters:
eventBus- the event bus used to subscribe to input channels and receive messages; must not benullid- the identifier of the specified Reactor. Commonly set in the config.spo2TrendChannel- channel address for the SpO2 trend analysisetCO2LimitChannel- channel address for the etCO2 limit analysissfLimitChannel- channel address for the sf Limit analysis- Throws:
NullPointerException- if any argument isnullIllegalArgumentException- if a rule is empty or references a channel not present ininputChannels, or contains an invalid token
-
-
Method Details
-
reactionFunction
Description copied from class:ReactorCalled once per evaluation cycle when any rule is satisfied.- Specified by:
reactionFunctionin classReactor- Parameters:
latestSnapshot- immutable snapshot of latest channel values and timestamps
-
