Interface ResultPublisher<K>
- All Known Subinterfaces:
AnnotationPublisher
,MetadataPublisher
,ValuePublisher
- All Known Implementing Classes:
DefaultAnnotationPublisher
,DefaultMetadataPublisher
,HistorianQueryExecutor
public interface ResultPublisher<K>
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
Enum representing the possible states of the publisher. -
Method Summary
Modifier and TypeMethodDescriptionvoid
cancel()
Cancels the publishing process.void
finish()
Completes the publishing process.void
Completes the publishing process with an error.Returns an identifier for this publisher.getState()
Returns the current state of the publisher.void
initializeWithFailure
(K key, QualityCode qualityCode) Initializes the publisher with a key and a quality code.
-
Method Details
-
getIdentifier
String getIdentifier()Returns an identifier for this publisher.- Returns:
- A String identifying this publisher instance
-
getState
ResultPublisher.PublisherState getState()Returns the current state of the publisher.- Returns:
- The current PublisherState
-
initializeWithFailure
Initializes the publisher with a key and a quality code.- Parameters:
key
- The key to initialize withqualityCode
- The quality code to initialize with
-
cancel
void cancel()Cancels the publishing process. Must be called if the publishing process is canceled before completion. -
finish
void finish()Completes the publishing process. Must be called after everything's been published. -
finishWithError
Completes the publishing process with an error. Must be called if an error occurs during the publishing process.- Parameters:
e
- The exception that caused the error.
-