Class RootBrowsePublisher
java.lang.Object
com.inductiveautomation.historian.gateway.api.query.browsing.RootBrowsePublisher
- All Implemented Interfaces:
BrowsePublisher
The RootBrowsePublisher class is responsible for publishing browsing results
starting from a specified root path. It implements the BrowsePublisher interface
and provides capability for managing results and handling nodes in the browsing
hierarchy.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
protected class
Nested classes/interfaces inherited from interface com.inductiveautomation.historian.gateway.api.query.browsing.BrowsePublisher
BrowsePublisher.NodeBuilder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addResult
(BasicResult result) void
cancel()
int
Retrieves the current count of results that have been added.boolean
Determines whether the browsing operation has been canceled.Creates a new node builder with the specified type ID and name.recurse()
Creates and returns a newBrowsePublisher
instance to continue browsing deeper into the hierarchical structure.void
setContinuationPoint
(String continuationPoint) Updates the continuation point for the browsing operation.void
setTotalResultsAvailable
(int totalResultsAvailable) Sets the total number of results that should be available for browsing.
-
Constructor Details
-
RootBrowsePublisher
-
-
Method Details
-
getResults
-
isCanceled
public boolean isCanceled()Description copied from interface:BrowsePublisher
Determines whether the browsing operation has been canceled.- Specified by:
isCanceled
in interfaceBrowsePublisher
- Returns:
- true if the browsing operation has been canceled, false otherwise.
-
cancel
public void cancel() -
getResultCount
public int getResultCount()Description copied from interface:BrowsePublisher
Retrieves the current count of results that have been added.- Specified by:
getResultCount
in interfaceBrowsePublisher
- Returns:
- the total number of results currently stored.
-
setTotalResultsAvailable
public void setTotalResultsAvailable(int totalResultsAvailable) Description copied from interface:BrowsePublisher
Sets the total number of results that should be available for browsing. This value is primarily used for pagination when implementing result size limits and managing continuation points.- Specified by:
setTotalResultsAvailable
in interfaceBrowsePublisher
- Parameters:
totalResultsAvailable
- The total count of results that exist in the complete result set regardless of any pagination constraints
-
setContinuationPoint
Description copied from interface:BrowsePublisher
Updates the continuation point for the browsing operation. The continuation point is used to track the current position within a paginated or hierarchical browsing structure, enabling continuation or resumption of browsing from a specific state.- Specified by:
setContinuationPoint
in interfaceBrowsePublisher
- Parameters:
continuationPoint
- the new continuation point to set, typically a string identifier representing the current position or state.
-
addResult
-
newNode
Description copied from interface:BrowsePublisher
Creates a new node builder with the specified type ID and name. The resultingBrowsePublisher.NodeBuilder
can be used to define various properties for the node before adding it to the browsing structure.- Specified by:
newNode
in interfaceBrowsePublisher
- Parameters:
typeId
- the type identifier for the new nodename
- the name of the new node- Returns:
- a
BrowsePublisher.NodeBuilder
instance to configure and add the new node
-
recurse
Description copied from interface:BrowsePublisher
Creates and returns a newBrowsePublisher
instance to continue browsing deeper into the hierarchical structure. This is typically used when recursive browsing is required, starting from the current state or node.- Specified by:
recurse
in interfaceBrowsePublisher
- Returns:
- a
BrowsePublisher
for recursive browsing at a deeper level of the hierarchy
-