Class LastEventSource
java.lang.Object
com.inductiveautomation.eventstream.gateway.sources.LastEventSource
- All Implemented Interfaces:
EventStreamSource
This source emits the last event that was emitted by a source. Used by Test Mode.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.inductiveautomation.eventstream.gateway.api.EventStreamSource
EventStreamSource.Factory, EventStreamSource.Subscriber
-
Constructor Summary
ConstructorsConstructorDescriptionLastEventSource
(LastSourceEventCache lastSourceEventCache, EventStreamKey key) -
Method Summary
Modifier and TypeMethodDescriptionstatic EventStreamSource.Factory
createFactory
(LastSourceEventCache lastSourceEventCache) void
Called onEventStreamSource
shutdown.void
onStartup
(EventStreamSource.Subscriber subscriber) Called on Event Stream startup.
-
Constructor Details
-
LastEventSource
-
-
Method Details
-
createFactory
-
onStartup
Description copied from interface:EventStreamSource
Called on Event Stream startup. Events can safely be sent toEventStreamSource.Subscriber.submitEvents(java.util.List<com.inductiveautomation.eventstream.EventPayload>)
orEventStreamSource.Subscriber.submitEvent(com.inductiveautomation.eventstream.EventPayload)
.- Specified by:
onStartup
in interfaceEventStreamSource
-
onShutdown
public void onShutdown()Description copied from interface:EventStreamSource
Called onEventStreamSource
shutdown. No more events should be sent throughEventStreamSource.Subscriber
. If events are submitted after, they'll immediately complete with Error result.- Specified by:
onShutdown
in interfaceEventStreamSource
-