Class DefaultMetadataPublisher
java.lang.Object
com.inductiveautomation.historian.gateway.query.DefaultMetadataPublisher
- All Implemented Interfaces:
MetadataPublisher
,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
Publishes metadata.
-
Constructor Details
-
DefaultMetadataPublisher
-
-
Method Details
-
publish
Description copied from interface:MetadataPublisher
Publishes metadata.- Specified by:
publish
in interfaceMetadataPublisher
- Parameters:
metadata
- The metadata to publish.- Throws:
IllegalStateException
- if the publisher is not in PUBLISHING state
-
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
-
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.
-
getMetadata
-
getQualityCodes
-
getError
-