Interface QueriedPointProcessor<P extends TemporalPoint<?,T>,K extends QueryKey<T>,T extends TemporalPointType & QueryablePointType<T>>
- Type Parameters:
P- The type of temporal point being processed.K- The type of query key used for identification.T- The type of temporal point type being processed, which must extend bothTemporalPointTypeandQueryablePointType.
- All Known Subinterfaces:
AggregatedPointProcessor,AnnotationPointProcessor,ComplexPointProcessor<P,,K> DataPointProcessor<P,,K> MetadataPointProcessor,RawPointProcessor
- All Known Implementing Classes:
DefaultAnnotationProcessor,DefaultMetadataProcessor
public interface QueriedPointProcessor<P extends TemporalPoint<?,T>,K extends QueryKey<T>,T extends TemporalPointType & QueryablePointType<T>>
Processes temporal points with support for initialization, point processing, and error handling.
Implementations handle specific point types and maintain processing state.
-
Method Summary
Modifier and TypeMethodDescriptionvoidCalled when all processing is complete.voidonError(QualityCode error) Handles a terminal error condition with a quality code.voidHandles a terminal error condition with an exception.booleanonInitialize(ProcessingContext<K, T> context) Initializes the processor with context information before processing begins.voidonKeyFailure(K queryKey, QualityCode failureCode) Handles a failure specific to a query key.booleanonPointAvailable(K queryKey, P point) Processes a single temporal point.
-
Method Details
-
onInitialize
Initializes the processor with context information before processing begins. This method is called once before any points are processed.- Parameters:
context- The processing context containing initialization properties.- Returns:
- True if initialization was successful and processing should continue, false to stop.
- Throws:
IllegalStateException- If the context is invalid or missing required properties.
-
onPointAvailable
Processes a single temporal point. Called repeatedly for each point in the result set.- Parameters:
queryKey- The query key associated with the point.point- The temporal point to process.- Returns:
- True to continue processing additional points, false to stop.
- Throws:
IllegalStateException- If called before successful initialization.
-
onKeyFailure
Handles a failure specific to a query key. Processing continues for other query keys after this is called. This method can be called prior toonInitialize(ProcessingContext)as needed.- Parameters:
queryKey- The query key that failed.failureCode- The quality code indicating the reason for failure.
-
onError
Handles a terminal error condition with a quality code. Processing stops after this method is called.- Parameters:
error- The quality code representing the error condition.
-
onError
Handles a terminal error condition with an exception. Processing stops after this method is called.- Parameters:
error- The exception that caused the error.
-
onComplete
void onComplete()Called when all processing is complete. This method is called exactly once after all points have been processed or processing has been stopped.
-