Class HandlerStage
java.lang.Object
com.inductiveautomation.eventstream.gateway.stages.Stage
com.inductiveautomation.eventstream.gateway.stages.handler.HandlerStage
Metrics:
{}.handler-{index}.received (Meter): Total events received
{}.handler-{index}.processTimeNs (Histogram)
{}.handler-{index}.errors (Counter)
-
Nested Class Summary
Nested classes/interfaces inherited from class com.inductiveautomation.eventstream.gateway.stages.Stage
Stage.ProcessResult, Stage.Subscriber
-
Field Summary
FieldsFields inherited from class com.inductiveautomation.eventstream.gateway.stages.Stage
METRIC_ERROR_COUNT, METRIC_PROCESS_TIME, METRIC_QUEUED_EVENT_COUNT, METRIC_RECEIVED, processTimeNs, receivedMeter, STATE_LAST_EMITTED_EVENT_KEY, STATE_LAST_EVENT_KEY, STATE_TEST_KEY
-
Constructor Summary
ConstructorsConstructorDescriptionHandlerStage
(StageContext context, String subId, HandlerDescriptor descriptor, EventStreamHandler handler, FailureStrategy failureStrategy) -
Method Summary
Modifier and TypeMethodDescriptionstatic String
generateId
(int index) getMetrics
(com.codahale.metrics.Snapshot processTimeNs) void
Called onceEventStream
subscribers are attached.Called onceEventStream
is stopped and before subscribers are detached.process
(StageEvent event) Provides record from previous stage.Methods inherited from class com.inductiveautomation.eventstream.gateway.stages.Stage
context, errorCount, forward, getDiagnostics, getErrors, getId, getMetrics, getReferenceLocation, getStatus, getTypeId, includeDiagnostics, log, onError, processTimeMostRecent, setIncludeDiagnostics, setStatus, subscribe
-
Field Details
-
ID
- See Also:
-
-
Constructor Details
-
HandlerStage
public HandlerStage(StageContext context, String subId, HandlerDescriptor descriptor, EventStreamHandler handler, FailureStrategy failureStrategy)
-
-
Method Details
-
generateId
-
getMetrics
- Overrides:
getMetrics
in classStage
-
onSubscribed
Description copied from class:Stage
Called onceEventStream
subscribers are attached. It's safe to begin emitting events at this point.- Overrides:
onSubscribed
in classStage
- Throws:
Exception
-
onUnsubscribe
Description copied from class:Stage
Called onceEventStream
is stopped and before subscribers are detached.- Overrides:
onUnsubscribe
in classStage
-
process
Description copied from class:Stage
Provides record from previous stage. It's important to notify a subscriber of action to take (if any) once a record has been processed. Process is always called from the previous stages thread.
-