Class DefaultAnnotationPublisher
java.lang.Object
com.inductiveautomation.historian.gateway.query.DefaultAnnotationPublisher
- All Implemented Interfaces:
AnnotationPublisher
,ResultPublisher<QualifiedPath>
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.inductiveautomation.historian.gateway.api.query.ResultPublisher
ResultPublisher.PublisherState
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
cancel()
Cancels the publishing process.void
finish()
Completes the publishing process.void
Completes the publishing process with an error.getError()
Returns an identifier for this publisher.getState()
Returns the current state of the publisher.void
initializeWithFailure
(QualifiedPath key, QualityCode qualityCode) Initializes the publisher with a key and a quality code.void
publish
(Annotation value) Publishes an annotation.
-
Constructor Details
-
DefaultAnnotationPublisher
-
-
Method Details
-
getIdentifier
Description copied from interface:ResultPublisher
Returns an identifier for this publisher.- Specified by:
getIdentifier
in interfaceResultPublisher<QualifiedPath>
- Returns:
- A String identifying this publisher instance
-
getState
Description copied from interface:ResultPublisher
Returns the current state of the publisher.- Specified by:
getState
in interfaceResultPublisher<QualifiedPath>
- Returns:
- The current PublisherState
-
initializeWithFailure
Description copied from interface:ResultPublisher
Initializes the publisher with a key and a quality code.- Specified by:
initializeWithFailure
in interfaceResultPublisher<QualifiedPath>
- Parameters:
key
- The key to initialize withqualityCode
- The quality code to initialize with
-
publish
Description copied from interface:AnnotationPublisher
Publishes an annotation.- Specified by:
publish
in interfaceAnnotationPublisher
- Parameters:
value
- The annotation to publish.- Throws:
IllegalStateException
- if the publisher is not in PUBLISHING state
-
cancel
public void cancel()Description copied from interface:ResultPublisher
Cancels the publishing process. Must be called if the publishing process is canceled before completion.- Specified by:
cancel
in interfaceResultPublisher<QualifiedPath>
-
finish
public void finish()Description copied from interface:ResultPublisher
Completes the publishing process. Must be called after everything's been published.- Specified by:
finish
in interfaceResultPublisher<QualifiedPath>
-
finishWithError
Description copied from interface:ResultPublisher
Completes the publishing process with an error. Must be called if an error occurs during the publishing process.- Specified by:
finishWithError
in interfaceResultPublisher<QualifiedPath>
- Parameters:
e
- The exception that caused the error.
-
getQualityCodeMap
-
getError
-
getAnnotations
-