Interface EventStreamRpc
- All Known Implementing Classes:
GatewayEventStreamRpc
public interface EventStreamRpc
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiongetDiagnostics(String projectName, String path) Returns the current diagnostics for the given Event Stream.Returns a list of all available Event Stream encoders.List of all available Event Stream Handler descriptors.List of all available Event Stream Source descriptors.Returns the current state of the Event Stream.listEventStreams(String project) Returns a list of all Event Streams in the given project.runEventStream(String projectName, String path, EventStreamConfig config, EventStreamRunConfig runConfig) Starts the Event Stream with the given configuration.booleanvalidateExpression(String project, ExpressionValue expressionValue) Validates the given expression value.
-
Field Details
-
SERIALIZER
-
-
Method Details
-
getSourceDescriptors
List<SourceDescriptor> getSourceDescriptors()List of all available Event Stream Source descriptors. -
getHandlerDescriptors
List<HandlerDescriptor> getHandlerDescriptors()List of all available Event Stream Handler descriptors. -
getEventStreamEncoders
List<EventStreamEncoder.Descriptor> getEventStreamEncoders()Returns a list of all available Event Stream encoders.- Returns:
- List of Event Stream encoder descriptors
-
listEventStreams
Returns a list of all Event Streams in the given project.- Parameters:
project- Project name- Returns:
- List of Event Stream descriptions
-
getDiagnostics
Returns the current diagnostics for the given Event Stream.- Parameters:
projectName- Project namepath- Path to Event Stream- Returns:
- Current diagnostics for the Event Stream
-
runEventStream
EventStreamDiagnostics runEventStream(String projectName, String path, EventStreamConfig config, EventStreamRunConfig runConfig) 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
configis read for its Source encoder alone. - Transform — that same event replayed
through the live, possibly-edited
configas 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.
- Parameters:
projectName- Project namepath- Path to Event Streamconfig- 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
runConfigasked for one
- Source — the last event the deployed
Event Stream's Source emitted, encoded. That event is cached, so no stream runs and
-
getState
Returns the current state of the Event Stream.- Parameters:
project- Project namepath- Path to Event Stream- Returns:
- Current state of the Event Stream
-
validateExpression
Validates the given expression value.- Parameters:
project- Project nameexpressionValue- Expression value to validate- Returns:
- True if the expression is valid, False otherwise
- Throws:
Exception
-