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 DiscoveryListener
s.- Author:
- Kai Kreuzer - Initial contribution, Andre Fuechsel - added support for time to live, Thomas Höfer - Added representation
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final long
Specifies that theDiscoveryResult
has no given time to live. -
Method Summary
Modifier and TypeMethodDescriptionReturns the binding ID of this result object.@Nullable ThingUID
Returns the uniqueBridge
ID of this result object.getFlag()
Returns the flag of this result object.
The flag signals e.g.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 String
Returns the representation property of this result object.Returns the uniqueThing
type ID of this result object.Returns the uniqueThing
ID of this result object.long
Returns the timestamp of this result object.long
Returns the time to live in seconds for this entry.default void
normalizePropertiesOnConfigDescription
(List<String> configurationParameters) Normalizes non-configuration properties by converting them to a String.
-
Field Details
-
TTL_UNLIMITED
static final long TTL_UNLIMITEDSpecifies that theDiscoveryResult
has no given time to live.- See Also:
-
-
Method Details
-
getThingUID
ThingUID getThingUID()Returns the uniqueThing
ID of this result object.A
ThingUID
must be a unique identifier of a concreteThing
which must not consist of data which could change (e.g. configuration data such as an IP address). If aThing
disappears and is discovered again, the sameThing
ID must be created. A typicalThing
ID could be the serial number. It's usually not a product number.- Returns:
- the Thing ID
-
getThingTypeUID
ThingTypeUID getThingTypeUID()Returns the uniqueThing
type ID of this result object.A
Thing
type ID could be a product number which identifies the same type ofThing
s. 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
Thing
ID.- 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
, themacAddress
or theserialNumber
of 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.NEW
or 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 uniqueBridge
ID of this result object.- Returns:
- the unique Bridge ID
-
getTimestamp
long getTimestamp()Returns the timestamp of this result object.- Returns:
- timestamp as long
-
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
- aList
containing the names of configuration parameters
-