org.fourthline.cling.protocol
Class RetrieveRemoteDescriptors

java.lang.Object
  extended by org.fourthline.cling.protocol.RetrieveRemoteDescriptors
All Implemented Interfaces:
Runnable

public class RetrieveRemoteDescriptors
extends Object
implements Runnable

Retrieves all remote device XML descriptors, parses them, creates an immutable device and service metadata graph.

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.

Author:
Christian Bauer

Field Summary
protected  List<UDN> errorsAlreadyLogged
           
 
Constructor Summary
RetrieveRemoteDescriptors(UpnpService upnpService, RemoteDevice rd)
           
 
Method Summary
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()
           
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

errorsAlreadyLogged

protected List<UDN> errorsAlreadyLogged
Constructor Detail

RetrieveRemoteDescriptors

public RetrieveRemoteDescriptors(UpnpService upnpService,
                                 RemoteDevice rd)
Method Detail

getUpnpService

public UpnpService getUpnpService()

run

public void run()
Specified by:
run in interface Runnable

describe

protected void describe()

describe

protected void describe(String descriptorXML)

describeServices

protected RemoteDevice describeServices(RemoteDevice currentDevice)
                                 throws DescriptorBindingException,
                                        ValidationException
Throws:
DescriptorBindingException
ValidationException

describeService

protected RemoteService describeService(RemoteService service)
                                 throws DescriptorBindingException,
                                        ValidationException
Throws:
DescriptorBindingException
ValidationException

filterExclusiveServices

protected List<RemoteService> filterExclusiveServices(RemoteService[] services)


Copyright © 2013 4th Line GmbH, Switzerland. All Rights Reserved.