Interface UpnpDiscoveryParticipant
@NonNullByDefault
public interface UpnpDiscoveryParticipant
A
UpnpDiscoveryParticipant
that is registered as a service is picked up by the UpnpDiscoveryService
and can thus contribute DiscoveryResult
s from
UPnP scans.- Author:
- Kai Kreuzer - Initial contribution
-
Field Summary
Modifier and TypeFieldDescriptionstatic final long
According to the UPnP specification, the minimum MaxAge is 1800 seconds. -
Method Summary
Modifier and TypeMethodDescription@Nullable DiscoveryResult
createResult
(org.jupnp.model.meta.RemoteDevice device) Creates a discovery result for a upnp devicedefault long
getRemovalGracePeriodSeconds
(org.jupnp.model.meta.RemoteDevice device) The JUPnP library strictly follows the UPnP specification insofar as if a device fails to send its next 'ssdp:alive' notification within its declared 'maxAge' period, it is immediately considered to be gone.Defines the list of thing types that this participant can identify@Nullable ThingUID
getThingUID
(org.jupnp.model.meta.RemoteDevice device) Returns the thing UID for a upnp device
-
Field Details
-
MIN_MAX_AGE_SECS
static final long MIN_MAX_AGE_SECSAccording to the UPnP specification, the minimum MaxAge is 1800 seconds.- See Also:
-
-
Method Details
-
getSupportedThingTypeUIDs
Set<ThingTypeUID> getSupportedThingTypeUIDs()Defines the list of thing types that this participant can identify- Returns:
- a set of thing type UIDs for which results can be created
-
createResult
Creates a discovery result for a upnp device- Parameters:
device
- the upnp device found on the network- Returns:
- the according discovery result or
null
, if device is not supported by this participant
-
getThingUID
Returns the thing UID for a upnp device- Parameters:
device
- the upnp device on the network- Returns:
- a thing UID or
null
, if device is not supported by this participant
-
getRemovalGracePeriodSeconds
default long getRemovalGracePeriodSeconds(org.jupnp.model.meta.RemoteDevice device) The JUPnP library strictly follows the UPnP specification insofar as if a device fails to send its next 'ssdp:alive' notification within its declared 'maxAge' period, it is immediately considered to be gone. But unfortunately some openHAB bindings handle devices that can sometimes be a bit late in sending their 'ssdp:alive' notifications even though they have not really gone offline, which means that such devices are repeatedly removed from, and (re)added to, the Inbox. To prevent this, a binding that implements a UpnpDiscoveryParticipant may OPTIONALLY implement this method to specify an additional delay period (grace period) to wait before the device is removed from the Inbox.- Parameters:
device
- the UPnP device on the network- Returns:
- the additional grace period delay in seconds before the device will be removed from the Inbox
-