public class Feature extends Object implements Jsonifiable
Modifier and Type | Class and Description |
---|---|
static class |
Feature.Builder |
Jsonifiable.JsonMapper
Modifier and Type | Method and Description |
---|---|
CompletionStage<FeatureDefinition> |
definition(DefinitionIdentifier definitionId)
Returns FeatureDefinition describing the Feature represented by this object.
|
CompletionStage<FeatureDefinition> |
definition(String fullyQualifiedIdentifier)
Returns FeatureDefinition describing the Feature represented by this object.
|
List<DefinitionIdentifier> |
definitions()
Returns the feature model definitions.
|
CompletionStage<Void> |
deleteDesiredProperties(String... acknowledgements)
Deletes the feature desired properties.
|
CompletionStage<Void> |
deleteDesiredProperty(String path,
String... acknowledgements)
Deletes the feature desired property identified by the
path . |
CompletionStage<Void> |
deleteProperties(String... acknowledgements)
Deletes the feature properties.
|
CompletionStage<Void> |
deleteProperty(String path,
String... acknowledgements)
Deletes the feature property specified by the given path.
|
List<Property<?>> |
desiredProperties()
Returns the feature desired properties.
|
Optional<?> |
desiredProperty(String propertyPath)
Returns the feature desired property identified by the
propertyPath parameter. |
String |
deviceId()
Returns the Device identifier this Feature belongs to.
|
boolean |
equals(Object obj) |
<T> CompletionStage<T> |
exec(String action,
Object... args)
Executes an operation on this Feature object.
|
int |
hashCode() |
String |
id()
Returns the Feature identifier.
|
CompletionStage<Void> |
message(String subject,
byte[] payload)
Sends byte[] message to this Feature object.
|
CompletionStage<Void> |
message(String subject,
String payload)
Sends string message to this Feature object.
|
static Feature.Builder |
newBuilder() |
static Feature.Builder |
newBuilder(DeviceInventoryRemote remote) |
List<Property<?>> |
properties()
Returns the properties of this feature.
|
Optional<?> |
property(String propertyPath)
Returns the feature property identified by the
propertyPath parameter. |
CompletionStage<byte[]> |
request(String subject,
byte[] payload)
Sends byte[] request to this Feature object.
|
CompletionStage<String> |
request(String subject,
String payload)
Sends string request to this Feature object.
|
CompletionStage<Void> |
setDesiredProperties(List<Property<?>> desiredProperties,
String... acknowledgements)
Sets the feature desired properties.
|
CompletionStage<Void> |
setDesiredProperty(Property<?> desiredProperty,
String... acknowledgements)
Sets the feature desired property.
|
CompletionStage<Void> |
setProperties(List<Property<?>> properties,
String... acknowledgements)
Sets the feature properties.
|
CompletionStage<Void> |
setProperty(Property<?> property,
String... acknowledgements)
Sets the feature property.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
toJsonString
public static Feature.Builder newBuilder()
public static Feature.Builder newBuilder(DeviceInventoryRemote remote)
public String deviceId()
public String id()
public List<DefinitionIdentifier> definitions()
public CompletionStage<FeatureDefinition> definition(DefinitionIdentifier definitionId)
definitionId
- the identifier of the definitionpublic CompletionStage<FeatureDefinition> definition(String fullyQualifiedIdentifier)
fullyQualifiedIdentifier
- the fully qualified identifier of the definition in form of namespace:name:version
public List<Property<?>> properties()
public Optional<?> property(String propertyPath)
propertyPath
parameter.propertyPath
- the property pathpropertyPath
identifierpublic CompletionStage<Void> setProperty(Property<?> property, String... acknowledgements)
property
- the value of the Property
to be set. Id and group of Property
are mandatory.
Id can be path to a nested valueacknowledgements
- requested acknowledgements for this operationCompletionStage
providing the result of the operationpublic CompletionStage<Void> deleteProperty(String path, String... acknowledgements)
path
- the path of the feature property to deletedacknowledgements
- requested acknowledgements for this operationCompletionStage
providing the result of the operationpublic CompletionStage<Void> setProperties(List<Property<?>> properties, String... acknowledgements)
properties
- properties to be setacknowledgements
- requested acknowledgements for this operationCompletionStage
providing the result of the operationpublic CompletionStage<Void> deleteProperties(String... acknowledgements)
acknowledgements
- requested acknowledgements for this operationCompletionStage
providing the result of the operationpublic <T> CompletionStage<T> exec(String action, Object... args)
T
- Operation Result typeaction
- Operation nameargs
- Operation argumentsCompletionStage
to track the operation execution and get operation resultpublic CompletionStage<Void> message(String subject, String payload)
subject
- subject of the messagepayload
- payloadCompletionStage
to track when the message has been sentpublic CompletionStage<Void> message(String subject, byte[] payload)
subject
- subject of the messagepayload
- payloadCompletionStage
to track when the message has been sentpublic CompletionStage<String> request(String subject, String payload)
subject
- subject of the messagepayload
- payloadCompletionStage
to track the responsepublic CompletionStage<byte[]> request(String subject, byte[] payload)
subject
- subject of the messagepayload
- payloadCompletionStage
to track the responsepublic List<Property<?>> desiredProperties()
public Optional<?> desiredProperty(String propertyPath)
propertyPath
parameter.propertyPath
- the desired property pathpropertyPath
identifierpublic CompletionStage<Void> setDesiredProperty(Property<?> desiredProperty, String... acknowledgements)
desiredProperty
- the value of the Property
to be set. Id and group of Property
are mandatory.
Id can be path to a nested valueacknowledgements
- requested acknowledgements for this operationCompletionStage
providing the result of the operationpublic CompletionStage<Void> deleteDesiredProperty(String path, String... acknowledgements)
path
.path
- the path of the desired property to deletedacknowledgements
- requested acknowledgements for this operationCompletionStage
providing the result of the operationpublic CompletionStage<Void> setDesiredProperties(List<Property<?>> desiredProperties, String... acknowledgements)
desiredProperties
- desired properties to be setacknowledgements
- requested acknowledgements for this operationCompletionStage
providing the result of the operationpublic CompletionStage<Void> deleteDesiredProperties(String... acknowledgements)
acknowledgements
- requested acknowledgements for this operationCompletionStage
providing the result of the operationCopyright © 2022 Bosch.IO GmbH. All rights reserved.