public class RetrieveRemoteDescriptors extends Object implements Runnable
This implementation encapsulates all steps which are necessary to create a fully usable and populated
device metadata graph of a particular UPnP device. It starts with an unhydrated and typically just
discovered RemoteDevice, the only property that has to be available is
its RemoteDeviceIdentity.
This protocol implementation will then retrieve the device's XML descriptor, parse it, and retrieve and
parse all service descriptors until all device and service metadata has been retrieved. The fully
hydrated device is then added to the Registry.
Any descriptor retrieval, parsing, or validation error of the metadata will abort this protocol with a warning message in the log.
| Modifier and Type | Field and Description |
|---|---|
protected List<UDN> |
errorsAlreadyLogged |
| Constructor and Description |
|---|
RetrieveRemoteDescriptors(UpnpService upnpService,
RemoteDevice rd) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
describe() |
protected void |
describe(String descriptorXML) |
protected RemoteService |
describeService(RemoteService service) |
protected RemoteDevice |
describeServices(RemoteDevice currentDevice) |
protected List<RemoteService> |
filterExclusiveServices(RemoteService[] services) |
UpnpService |
getUpnpService() |
static boolean |
isRetrievalInProgress(RemoteDevice rd)
Check if the descriptor that is going to be retrieved by this task is already being retrieved by another task.
|
void |
run() |
public RetrieveRemoteDescriptors(UpnpService upnpService, RemoteDevice rd)
public UpnpService getUpnpService()
protected void describe()
throws RouterException
RouterExceptionprotected void describe(String descriptorXML) throws RouterException
RouterExceptionprotected RemoteDevice describeServices(RemoteDevice currentDevice) throws RouterException, DescriptorBindingException, ValidationException
protected RemoteService describeService(RemoteService service) throws RouterException, DescriptorBindingException, ValidationException
protected List<RemoteService> filterExclusiveServices(RemoteService[] services)
public static boolean isRetrievalInProgress(RemoteDevice rd)
rd - The remote device to checktrue the descriptor is currently being retrieved, otherwise falseIllegalArgumentException - if the remote device is nullCopyright © 2023 jUPnP.org. All rights reserved.