Interface DiscoveryResult


@NonNullByDefault public interface DiscoveryResult
The 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 Details

  • Method Details

    • getThingUID

      ThingUID getThingUID()
      Returns the unique Thing ID of this result object.

      A ThingUID must be a unique identifier of a concrete Thing which must not consist of data which could change (e.g. configuration data such as an IP address). If a Thing disappears and is discovered again, the same Thing ID must be created. A typical Thing ID could be the serial number. It's usually not a product number.

      Returns:
      the Thing ID
    • getThingTypeUID

      ThingTypeUID getThingTypeUID()
      Returns the unique Thing type ID of this result object.

      A Thing type ID could be a product number which identifies the same type of Things. 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

      Map<String,Object> getProperties()
      Returns the properties of this result object.
      The properties contain information which become part of a Thing.

      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 the ipAddress, the macAddress or the serialNumber of the discovered thing.

      Returns:
      the representation property
    • getFlag

      Returns the flag of this result object.
      The flag signals e.g. if the result is DiscoveryResultFlag.NEW or has been marked as DiscoveryResultFlag.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 unique Bridge 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

      default void normalizePropertiesOnConfigDescription(List<String> configurationParameters)
      Normalizes non-configuration properties by converting them to a String. Properties in the list passed to this method remain unchanged.
      Parameters:
      configurationParameters - a List containing the names of configuration parameters