Interface DiscoveryResult
DiscoveryResult is a container for one result of a discovery process.
The discovery process can lead to 0..N DiscoveryResult objects
which are fired as an event to registered DiscoveryListeners.- Author:
- Kai Kreuzer - Initial contribution, Andre Fuechsel - added support for time to live, Thomas Höfer - Added representation
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longSpecifies that theDiscoveryResulthas no given time to live. -
Method Summary
Modifier and TypeMethodDescriptionReturns the binding ID of this result object.@Nullable ThingUIDReturns the uniqueBridgeID of this result object.Returns the creation time of this result object.getFlag()Returns the flag of this result object.
The flag signals e.g. if the result isDiscoveryResultFlag.NEWor has been marked asDiscoveryResultFlag.IGNORED.getLabel()Returns the human readable label for this result object.Returns the properties of this result object.
The properties contain information which become part of aThing.@Nullable StringReturns the representation property of this result object.Returns the uniqueThingtype ID of this result object.Returns the uniqueThingID of this result object.longReturns the time to live in seconds for this entry.default voidnormalizePropertiesOnConfigDescription(List<String> configurationParameters) Normalizes non-configuration properties by converting them to a String.
-
Field Details
-
TTL_UNLIMITED
static final long TTL_UNLIMITEDSpecifies that theDiscoveryResulthas no given time to live.- See Also:
-
-
Method Details
-
getThingUID
ThingUID getThingUID()Returns the uniqueThingID of this result object.A
ThingUIDmust be a unique identifier of a concreteThingwhich must not consist of data which could change (e.g. configuration data such as an IP address). If aThingdisappears and is discovered again, the sameThingID must be created. A typicalThingID could be the serial number. It's usually not a product number.- Returns:
- the Thing ID
-
getThingTypeUID
ThingTypeUID getThingTypeUID()Returns the uniqueThingtype ID of this result object.A
Thingtype ID could be a product number which identifies the same type ofThings. It's usually not a serial number.- Returns:
- the unique Thing type
-
getBindingId
String getBindingId()Returns the binding ID of this result object.The binding ID is extracted from the unique
ThingID.- Returns:
- the binding ID
-
getProperties
Returns the properties of this result object.
The properties contain information which become part of aThing.Hint: The returned properties are immutable.
- Returns:
- the properties (could be empty)
-
getRepresentationProperty
@Nullable String getRepresentationProperty()Returns the representation property of this result object.The representation property represents a unique human and/or machine readable identifier of the thing that was discovered. Its actual value can be retrieved from the
getProperties()map. Such unique identifiers are typically theipAddress, themacAddressor theserialNumberof the discovered thing.- Returns:
- the representation property
-
getFlag
DiscoveryResultFlag getFlag()Returns the flag of this result object.
The flag signals e.g. if the result isDiscoveryResultFlag.NEWor has been marked asDiscoveryResultFlag.IGNORED. In the latter case the result object should be regarded as known by the system so that further processing should be skipped.- Returns:
- the flag
-
getLabel
String getLabel()Returns the human readable label for this result object.- Returns:
- the human readable label (could be empty)
-
getBridgeUID
@Nullable ThingUID getBridgeUID()Returns the uniqueBridgeID of this result object.- Returns:
- the unique Bridge ID
-
getCreationTime
Instant getCreationTime()Returns the creation time of this result object.- Returns:
- timestamp
-
getTimeToLive
long getTimeToLive()Returns the time to live in seconds for this entry.- Returns:
- time to live in seconds
-
normalizePropertiesOnConfigDescription
Normalizes non-configuration properties by converting them to a String. Properties in the list passed to this method remain unchanged.- Parameters:
configurationParameters- aListcontaining the names of configuration parameters
-