Klasse DefaultRegistryListener
- Alle implementierten Schnittstellen:
RegistryListener
Also unifies local and remote device additions and removals with
deviceAdded(Registry, org.jupnp.model.meta.Device) and
deviceRemoved(Registry, org.jupnp.model.meta.Device) methods.
- Autor:
- Christian Bauer
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidCalled after the registry has been cleared on shutdown.voidbeforeShutdown(Registry registry) Called after registry maintenance stops but before the registry is cleared.voiddeviceAdded(Registry registry, Device device) voiddeviceRemoved(Registry registry, Device device) voidlocalDeviceAdded(Registry registry, LocalDevice device) Calls thedeviceAdded(Registry, org.jupnp.model.meta.Device)method.voidlocalDeviceRemoved(Registry registry, LocalDevice device) Calls thedeviceRemoved(Registry, org.jupnp.model.meta.Device)method.voidremoteDeviceAdded(Registry registry, RemoteDevice device) Calls thedeviceAdded(Registry, org.jupnp.model.meta.Device)method.voidremoteDeviceDiscoveryFailed(Registry registry, RemoteDevice device, Exception e) Called when service metadata couldn't be initialized.voidremoteDeviceDiscoveryStarted(Registry registry, RemoteDevice device) Called as soon as possible after a device has been discovered.voidremoteDeviceRemoved(Registry registry, RemoteDevice device) Calls thedeviceRemoved(Registry, org.jupnp.model.meta.Device)method.voidremoteDeviceUpdated(Registry registry, RemoteDevice device) Called when a discovered device's expiration timestamp is updated.
-
Konstruktordetails
-
DefaultRegistryListener
public DefaultRegistryListener()
-
-
Methodendetails
-
remoteDeviceDiscoveryStarted
Beschreibung aus Schnittstelle kopiert:RegistryListenerCalled as soon as possible after a device has been discovered.This method will be called after SSDP notification datagrams of a new alive UPnP device have been received and processed. The announced device XML descriptor will be retrieved and parsed. The given
RemoteDevicemetadata is validated and partialServicemetadata is available. The services are unhydrated, they have no actions or state variable metadata because the service descriptors of the device model have not been retrieved at this point.You typically do not use this method on a regular machine, this is an optimization for slower UPnP hosts (such as Android handsets).
- Angegeben von:
remoteDeviceDiscoveryStartedin SchnittstelleRegistryListener- Parameter:
registry- The jUPnP registry of all devices and services know to the local UPnP stack.device- A validated and hydrated device metadata graph, with anemic service metadata.
-
remoteDeviceDiscoveryFailed
Beschreibung aus Schnittstelle kopiert:RegistryListenerCalled when service metadata couldn't be initialized.If you override the
RegistryListener.remoteDeviceDiscoveryStarted(Registry, org.jupnp.model.meta.RemoteDevice)method, you might want to override this method as well.- Angegeben von:
remoteDeviceDiscoveryFailedin SchnittstelleRegistryListener- Parameter:
registry- The jUPnP registry of all devices and services know to the local UPnP stack.device- A validated and hydrated device metadata graph, with anemic service metadata.e- The reason why service metadata could not be initialized, ornullif service descriptors couldn't be retrieved at all.
-
remoteDeviceAdded
Calls thedeviceAdded(Registry, org.jupnp.model.meta.Device)method.- Angegeben von:
remoteDeviceAddedin SchnittstelleRegistryListener- Parameter:
registry- The jUPnP registry of all devices and services know to the local UPnP stack.device- A validated and hydrated device metadata graph, with complete service metadata.
-
remoteDeviceUpdated
Beschreibung aus Schnittstelle kopiert:RegistryListenerCalled when a discovered device's expiration timestamp is updated.This is a signal that a device is still alive and you typically don't have to react to this event. You will be notified when a device disappears through timeout.
- Angegeben von:
remoteDeviceUpdatedin SchnittstelleRegistryListener- Parameter:
registry- The jUPnP registry of all devices and services know to the local UPnP stack.device- A validated and hydrated device metadata graph, with complete service metadata.
-
remoteDeviceRemoved
Calls thedeviceRemoved(Registry, org.jupnp.model.meta.Device)method.- Angegeben von:
remoteDeviceRemovedin SchnittstelleRegistryListener- Parameter:
registry- The jUPnP registry of all devices and services know to the local UPnP stack.device- A validated and hydrated device metadata graph, with complete service metadata.
-
localDeviceAdded
Calls thedeviceAdded(Registry, org.jupnp.model.meta.Device)method.- Angegeben von:
localDeviceAddedin SchnittstelleRegistryListener- Parameter:
registry- The jUPnP registry of all devices and services know to the local UPnP stack.device- The local device added to theRegistry.
-
localDeviceRemoved
Calls thedeviceRemoved(Registry, org.jupnp.model.meta.Device)method.- Angegeben von:
localDeviceRemovedin SchnittstelleRegistryListener- Parameter:
registry- The jUPnP registry of all devices and services know to the local UPnP stack.device- The local device removed from theRegistry.
-
deviceAdded
-
deviceRemoved
-
beforeShutdown
Beschreibung aus Schnittstelle kopiert:RegistryListenerCalled after registry maintenance stops but before the registry is cleared.This method should typically not block, it executes in the thread that shuts down the UPnP stack.
- Angegeben von:
beforeShutdownin SchnittstelleRegistryListener- Parameter:
registry- The jUPnP registry of all devices and services know to the local UPnP stack.
-
afterShutdown
public void afterShutdown()Beschreibung aus Schnittstelle kopiert:RegistryListenerCalled after the registry has been cleared on shutdown.This method should typically not block, it executes in the thread that shuts down the UPnP stack.
- Angegeben von:
afterShutdownin SchnittstelleRegistryListener
-