Class EventStreamFactory
java.lang.Object
com.inductiveautomation.eventstream.gateway.EventStreamFactory
-
Constructor Summary
ConstructorsConstructorDescriptionEventStreamFactory(ExecutorService executor, ScheduledExecutorService scheduledExecutor, com.codahale.metrics.MetricRegistry gatewayMetrics, EventStreamRegistries registries, Function<String, ScriptManager> projectScriptManager, EventStreamExpressionFactoryProducer abstractExpressionFactory, LastSourceEventCache lastEventCache, FailureStrategy.Factory failureStrategyFactory) -
Method Summary
Modifier and TypeMethodDescriptioncreate(ResourceId resourceId, EventStreamConfig config) org.apache.commons.lang3.tuple.Pair<EventStream, PreviewCaptureStage> createWithPreview(ResourceId resourceId, EventStreamConfig config, EventStreamRunConfig runConfig) Builds a transient EventStream for a one-off run, along with thePreviewCaptureStagethat reports what the run's stages have produced.
-
Constructor Details
-
EventStreamFactory
public EventStreamFactory(ExecutorService executor, ScheduledExecutorService scheduledExecutor, com.codahale.metrics.MetricRegistry gatewayMetrics, EventStreamRegistries registries, Function<String, ScriptManager> projectScriptManager, EventStreamExpressionFactoryProducer abstractExpressionFactory, LastSourceEventCache lastEventCache, FailureStrategy.Factory failureStrategyFactory)
-
-
Method Details
-
create
-
createWithPreview
public org.apache.commons.lang3.tuple.Pair<EventStream, PreviewCaptureStage> createWithPreview(ResourceId resourceId, EventStreamConfig config, EventStreamRunConfig runConfig) Builds a transient EventStream for a one-off run, along with thePreviewCaptureStagethat reports what the run's stages have produced.A previewing run is built with
PREVIEW_SOURCEin place ofconfig's own Source, so a preview always replays the last event the deployed Source captured, and with the capture stages wired into the pipeline. Any other run gets neither: its capture is returned unwired and stays empty, because there is no preview to report.- Returns:
- the stream to run, and the capture to ask for the preview once it has stopped
-