Record Class EventStreamConfig
java.lang.Object
java.lang.Record
com.inductiveautomation.eventstream.config.EventStreamConfig
- Record Components:
enabled- True, starts the Event Stream when created. False, will create the Event Stream but won't be started.source- Source configurationhandlers- Configurations for multiple Handlers, order determines the processing order.batch- Batch configurationfilter- Filter configurationtransform- Transform configurationonError- OnError configuration
public record EventStreamConfig(boolean enabled, SourceConfig source, EventStreamEncoder.Config sourceEncoder, List<HandlerConfig> handlers, BatchConfig batch, FilterConfig filter, TransformConfig transform, EventStreamEncoder.Config transformEncoder, OnErrorConfig onError)
extends Record
Contains full configuration required to start an Event Stream
-
Constructor Summary
ConstructorsConstructorDescriptionEventStreamConfig(boolean enabled, SourceConfig source, EventStreamEncoder.Config sourceEncoder, List<HandlerConfig> handlers, BatchConfig batch, FilterConfig filter, TransformConfig transform, EventStreamEncoder.Config transformEncoder, OnErrorConfig onError) Creates an instance of aEventStreamConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbatch()Returns the value of thebatchrecord component.static EventStreamConfigcreateDefault(String sourceType) static EventStreamEncoder.Configbooleanenabled()Returns the value of theenabledrecord component.final booleanIndicates whether some other object is "equal to" this one.filter()Returns the value of thefilterrecord component.handlers()Returns the value of thehandlersrecord component.final inthashCode()Returns a hash code value for this object.onError()Returns the value of theonErrorrecord component.This configuration made runnable as a one-shot preview: the Source is replaced by the Gateway's last-event source, batching is switched off so the run reports the single event rather than waiting for a batch to fill, and the stream is enabled so a disabled stream can still be previewed.source()Returns the value of thesourcerecord component.Returns the value of thesourceEncoderrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetransformrecord component.Returns the value of thetransformEncoderrecord component.
-
Constructor Details
-
EventStreamConfig
public EventStreamConfig(boolean enabled, SourceConfig source, EventStreamEncoder.Config sourceEncoder, List<HandlerConfig> handlers, BatchConfig batch, FilterConfig filter, TransformConfig transform, EventStreamEncoder.Config transformEncoder, OnErrorConfig onError) Creates an instance of aEventStreamConfigrecord class.- Parameters:
enabled- the value for theenabledrecord componentsource- the value for thesourcerecord componentsourceEncoder- the value for thesourceEncoderrecord componenthandlers- the value for thehandlersrecord componentbatch- the value for thebatchrecord componentfilter- the value for thefilterrecord componenttransform- the value for thetransformrecord componenttransformEncoder- the value for thetransformEncoderrecord componentonError- the value for theonErrorrecord component
-
-
Method Details
-
createDefault
-
createDefaultEncoderConfig
-
replayingLastEvent
This configuration made runnable as a one-shot preview: the Source is replaced by the Gateway's last-event source, batching is switched off so the run reports the single event rather than waiting for a batch to fill, and the stream is enabled so a disabled stream can still be previewed.Every other stage is carried over untouched, which is what makes the previewed pipeline the configured one — a caller can hold the live configuration and derive the runnable form from it rather than tracking two configurations.
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
enabled
-
source
-
sourceEncoder
Returns the value of thesourceEncoderrecord component.- Returns:
- the value of the
sourceEncoderrecord component
-
handlers
-
batch
-
filter
-
transform
-
transformEncoder
Returns the value of thetransformEncoderrecord component.- Returns:
- the value of the
transformEncoderrecord component
-
onError
-