Class LoggerHandler
java.lang.Object
com.inductiveautomation.eventstream.gateway.handlers.LoggerHandler
- All Implemented Interfaces:
EventStreamHandler
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.inductiveautomation.eventstream.gateway.api.EventStreamHandler
EventStreamHandler.Descriptor, EventStreamHandler.Factory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic EventStreamHandler.Factory
void
handle
(List<EventPayload> events, boolean testMode) Called when a batch of events is ready to be processed.void
onStartup
(EventStreamExpressionFactory expressionFactory) Called when Event Stream first starts and before theEventStreamHandler
starts receiving events throughEventStreamHandler.handle(java.util.List<com.inductiveautomation.eventstream.EventPayload>, boolean)
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.inductiveautomation.eventstream.gateway.api.EventStreamHandler
onShutdown
-
Constructor Details
-
LoggerHandler
-
-
Method Details
-
createFactory
-
onStartup
Description copied from interface:EventStreamHandler
Called when Event Stream first starts and before theEventStreamHandler
starts receiving events throughEventStreamHandler.handle(java.util.List<com.inductiveautomation.eventstream.EventPayload>, boolean)
.- Specified by:
onStartup
in interfaceEventStreamHandler
- Parameters:
expressionFactory
- Factory for creatingEventStreamExpression
from expression fields.- Throws:
Exception
- An exception here will prevent the Event Stream for subscribing to source. This is useful if something fails in onStartup() thatEventStreamHandler.handle(java.util.List<com.inductiveautomation.eventstream.EventPayload>, boolean)
requires to successfully process events.
-
handle
Description copied from interface:EventStreamHandler
Called when a batch of events is ready to be processed. It's important that an exception is throw on errors encountered during handling of events. If an exception is encountered, it should be expected that the method may be called again in the future with the same events. This is determined by the failure strategy specified by the Event Stream configuration.- Specified by:
handle
in interfaceEventStreamHandler
- Parameters:
events
- List of events to process.testMode
- True, if Event Stream is running in test mode. If running in testMode, expressions should be evaluated with no other side effects.- Throws:
Exception
- Exception thrown during processing.
-