public interface TagInventory
Modifier and Type | Method and Description |
---|---|
CompletionStage<Tag> |
createTag(Parameters parameters,
String... acknowledgements)
Creates a tag according to the specified parameters.
|
CompletionStage<Void> |
deleteTag(String name,
String... acknowledgements)
Deletes the tag with the specified name.
|
void |
subscribeForTagEvents(List<TagEvent.Type> types,
StreamConsumer<TagEvent> consumer)
Subscribe for
Tag events. |
CompletionStage<Void> |
subscribeForTagEvents(String subscriptionId,
List<TagEvent.Type> types,
Target target)
Subscribe for
Tag events. |
CompletionStage<Tag> |
tag(String name)
Returns the tag with the specified name.
|
CompletionStage<Void> |
tagDevice(String deviceId,
String tagName,
String... acknowledgements)
Tags the device with the specified id - that is, attaches the tag with the specified name to the device.
|
com.bosch.iot.dm.util.PageIterator<Subscription<List<TagEvent.Type>>> |
tagEventSubscriptions(int pageSize)
Returns a list of tag event subscriptions grouped in pages.
|
PageIterator<Tag> |
tags(Filter filter,
int pageSize)
Returns a list of tags matching the specified filter, divided into pages.
|
PageIterator<Tag> |
tags(int pageSize)
Returns a list of all tags, divided into pages.
|
CompletionStage<Integer> |
tagsCount(Filter filter)
Returns the number of tags matching the given filter.
|
CompletionStage<Void> |
unsubscribeForTagEvents(String subscriptionId)
Delete a persistent subscription for
Tag events with subscription id. |
CompletionStage<Void> |
untagDevice(String deviceId,
String tagName,
String... acknowledgements)
Untags the device with the specified id - that is, detaches the tag with the specified name from the device.
|
CompletionStage<Tag> tag(String name)
name
- the name of the tagCompletionStage
providing the tag with the specified namePageIterator<Tag> tags(int pageSize)
pageSize
- the page sizePageIterator
providing a list of all tags, divided into pagesPageIterator<Tag> tags(Filter filter, int pageSize)
filter
- the filter to match againstpageSize
- the page sizePageIterator
providing a list of tags matching the specified filter, divided into pagesCompletionStage<Tag> createTag(Parameters parameters, String... acknowledgements)
parameters
- parameters of the tag to be createdacknowledgements
- requested acknowledgements for this operationCompletionStage
providing the newly created tagCompletionStage<Void> deleteTag(String name, String... acknowledgements)
name
- the name of the tag to be deletedacknowledgements
- requested acknowledgements for this operationCompletionStage
providing the result of the operationCompletionStage<Void> tagDevice(String deviceId, String tagName, String... acknowledgements)
deviceId
- the id of the device to be taggedtagName
- the name of the tag to be attachedacknowledgements
- requested acknowledgements for this operationCompletionStage
providing the result of the operationCompletionStage<Void> untagDevice(String deviceId, String tagName, String... acknowledgements)
deviceId
- the id of the device to be untaggedtagName
- the name of the tag to be detachedacknowledgements
- requested acknowledgements for this operationCompletionStage
providing the result of the operationvoid subscribeForTagEvents(List<TagEvent.Type> types, StreamConsumer<TagEvent> consumer)
Tag
events. This subscription is not persistent.types
- event types to subscribe for. Empty list will subscribe you for all event typesconsumer
- event consumerCompletionStage<Void> subscribeForTagEvents(String subscriptionId, List<TagEvent.Type> types, Target target)
Tag
events. This subscription is persistent and must be deleted explicitly by the user using
unsubscribeForTagEvents(String)
.subscriptionId
- subscription id. The subscription id must be unique in the scope of the event source. Using this
subscription id the user may set consumer for the subscriptiontypes
- event types to subscribe for. Empty list will subscribe you for all event typestarget
- target where the events shall be sent toCompletionStage
that is completed successfully if the subscription has been finished and
exceptionally in case of failureCompletionStage<Void> unsubscribeForTagEvents(String subscriptionId)
Tag
events with subscription id.subscriptionId
- subscription idCompletionStage
that is completed successfully if the subscription has been finished and
exceptionally in case of failurecom.bosch.iot.dm.util.PageIterator<Subscription<List<TagEvent.Type>>> tagEventSubscriptions(int pageSize)
pageSize
- the number of subscriptions returned within a pageCompletionStage<Integer> tagsCount(Filter filter)
filter
- the filter the tags to be returned to be matched againstCopyright © 2022 Bosch.IO GmbH. All rights reserved.