Package com.framed.arn
Class RuleUtils
java.lang.Object
com.framed.arn.RuleUtils
Runtime helpers shared by
Reactor and its concrete implementations:
extracting a logical timestamp from an incoming message and publishing a result
envelope to a reactor's output channels.-
Method Summary
Modifier and TypeMethodDescriptionstatic InstantextractTimestamp(Object latest) Parses the logical timestamp from an incoming message, if present.static voidpublishResult(EventBus eventBus, Object value, String id, List<String> outputChannels, Instant timestamp) Publishes a result envelope (timestamp,className,value,channelID) to each output channel and announces those channels so sinks can discover them.
-
Method Details
-
publishResult
public static void publishResult(EventBus eventBus, Object value, String id, List<String> outputChannels, Instant timestamp) Publishes a result envelope (timestamp,className,value,channelID) to each output channel and announces those channels so sinks can discover them.- Parameters:
eventBus- the bus to publish onvalue- the result valueid- the producing reactor's classification idoutputChannels- channels to publish the result totimestamp- the logical timestamp of the result
-
extractTimestamp
Parses the logical timestamp from an incoming message, if present.- Parameters:
latest- the latest message for a channel (expected to be aJSONObject)- Returns:
- the parsed
Instant, ornullif absent/unparseable
-
