Interface EventStreamSource.Subscriber
- Enclosing interface:
- EventStreamSource
public static interface EventStreamSource.Subscriber
Interface for submitting events to the Event Stream.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Notifies Event Stream an error occurred.default CompletionStage<EventResult>
submitEvent
(EventPayload event) Notifies Event Stream that an event has arrived and are ready to process.submitEvents
(List<EventPayload> events) Notifies Event Stream that events have arrived and are ready to process.
-
Method Details
-
submitEvents
Notifies Event Stream that events have arrived and are ready to process.
This call will never block. If blocking is desired, use the returnedCompletionStage
to wait for the event to be processed.- Parameters:
events
- List of events to pass Event Stream to start processing.- Returns:
- Future of results that completes once all
events
have been processed.
-
submitEvent
Notifies Event Stream that an event has arrived and are ready to process. If multiple events are available,submitEvents(java.util.List<com.inductiveautomation.eventstream.EventPayload>)
should be used.
This call will never block. If blocking is desired, use the returnedCompletionStage
to wait for the event to be processed.- Parameters:
event
- Event to pass Event Stream to start processing.- Returns:
- Future of results that completes once all
events
have been processed.
-
onError
Notifies Event Stream an error occurred. This is primarily used for diagnostics, the Event Stream will still be considered running until Shutdown. If the error is resolved events can continue to be submitted- Parameters:
throwable
- Throwable that caused the error.
-