Class GatewayEventStreamRpc

java.lang.Object
com.inductiveautomation.eventstream.gateway.rpc.GatewayEventStreamRpc
All Implemented Interfaces:
EventStreamRpc

public class GatewayEventStreamRpc extends Object implements EventStreamRpc
  • Constructor Details

    • GatewayEventStreamRpc

      public GatewayEventStreamRpc(EventStreamManager eventStreamManager)
  • Method Details

    • getSourceDescriptors

      public List<SourceDescriptor> getSourceDescriptors()
      Description copied from interface: EventStreamRpc
      List of all available Event Stream Source descriptors.
      Specified by:
      getSourceDescriptors in interface EventStreamRpc
    • getHandlerDescriptors

      public List<HandlerDescriptor> getHandlerDescriptors()
      Description copied from interface: EventStreamRpc
      List of all available Event Stream Handler descriptors.
      Specified by:
      getHandlerDescriptors in interface EventStreamRpc
    • getEventStreamEncoders

      public List<EventStreamEncoder.Descriptor> getEventStreamEncoders()
      Description copied from interface: EventStreamRpc
      Returns a list of all available Event Stream encoders.
      Specified by:
      getEventStreamEncoders in interface EventStreamRpc
      Returns:
      List of Event Stream encoder descriptors
    • listEventStreams

      public List<EventStreamDescription> listEventStreams(String project)
      Description copied from interface: EventStreamRpc
      Returns a list of all Event Streams in the given project.
      Specified by:
      listEventStreams in interface EventStreamRpc
      Parameters:
      project - Project name
      Returns:
      List of Event Stream descriptions
    • getDiagnostics

      public EventStreamDiagnostics getDiagnostics(String projectName, String path)
      Description copied from interface: EventStreamRpc
      Returns the current diagnostics for the given Event Stream.
      Specified by:
      getDiagnostics in interface EventStreamRpc
      Parameters:
      projectName - Project name
      path - Path to Event Stream
      Returns:
      Current diagnostics for the Event Stream
    • runEventStream

      public EventStreamDiagnostics runEventStream(String projectName, String path, EventStreamConfig config, EventStreamRunConfig runConfig)
      Description copied from interface: EventStreamRpc
      Starts the Event Stream with the given configuration. Stops immediately after the first event.

      A previewing run configuration additionally describes the shape a downstream stage would receive, reporting it in EventStreamDiagnostics.previewOutput(). The two previews differ in what they must do to answer:

      • Source — the last event the deployed Event Stream's Source emitted, encoded. That event is cached, so no stream runs and config is read for its Source encoder alone.
      • Transform — that same event replayed through the live, possibly-edited config as a throwaway stream, so Designer can preview a Transform while it is being edited, encoded with that config's Transform encoder.

      Neither preview is told which encoder to describe its output with: it is the one the previewed stage already carries in config.

      The reason a preview could not be produced — no Source event captured, no Transform enabled, a stage faulted, or the output could not be encoded — is carried in that result rather than thrown, so callers can surface it.

      Specified by:
      runEventStream in interface EventStreamRpc
      Parameters:
      projectName - Project name
      path - Path to Event Stream
      config - Configuration for the Event Stream. A Source preview reads the deployed Event Stream and runs nothing of its own, so it reads only this config's Source encoder.
      runConfig - Run configuration for the Event Stream
      Returns:
      Current diagnostics for the Event Stream, carrying the encoded preview output when runConfig asked for one
    • getState

      public EventStreamState getState(String project, String path)
      Description copied from interface: EventStreamRpc
      Returns the current state of the Event Stream.
      Specified by:
      getState in interface EventStreamRpc
      Parameters:
      project - Project name
      path - Path to Event Stream
      Returns:
      Current state of the Event Stream
    • validateExpression

      public boolean validateExpression(String project, ExpressionValue expressionValue)
      Description copied from interface: EventStreamRpc
      Validates the given expression value.
      Specified by:
      validateExpression in interface EventStreamRpc
      Parameters:
      project - Project name
      expressionValue - Expression value to validate
      Returns:
      True if the expression is valid, False otherwise