Package org.openremote.model.protocol
Interface ProtocolAssetImport
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
To be used by protocols that support device import from a protocol specific file. These devices can be represented as
Asset
s with Attribute
s that contain the necessary MetaItem
s
to establish a link to the linked Agent
. These Asset
s can then be structured in
a hierarchical representation using AssetTreeNode
s.
Protocol
s that support Asset
import must implement this interface.
It is the caller's responsibility to ensure that only a single import occurs at a given time.
-
Method Summary
Modifier and TypeMethodDescriptionstartAssetImport
(byte[] fileData, Consumer<AssetTreeNode[]> assetConsumer) Start the process asynchronously; the implementation can make as many calls as it desires to the assetConsumer with the found assets; when the implementation has finished then the returned future will becomeFuture.isDone()
.
-
Method Details
-
startAssetImport
Start the process asynchronously; the implementation can make as many calls as it desires to the assetConsumer with the found assets; when the implementation has finished then the returned future will becomeFuture.isDone()
. The callee can also cancel the future at any time. If for some reason the process cannot be started or encounters an error then this method should log more details before completing the future.
-