org.fourthline.cling.protocol

## Class RetrieveRemoteDescriptors

- java.lang.Object
- - 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

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected List<UDN>` | `errorsAlreadyLogged`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RetrieveRemoteDescriptors(UpnpService upnpService, RemoteDevice rd)`

  - ### Method Summary

    Methods
    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()`
    `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()
                           throws RouterException

      Throws:
        `RouterException`

    - #### describe

          protected void describe(String descriptorXML)
                           throws RouterException

      Throws:
        `RouterException`

    - #### describeServices

          protected RemoteDevice describeServices(RemoteDevice currentDevice)
                                           throws RouterException,
                                                  DescriptorBindingException,
                                                  ValidationException

      Throws:
        `RouterException`
        `DescriptorBindingException`
        `ValidationException`

    - #### describeService

          protected RemoteService describeService(RemoteService service)
                                           throws RouterException,
                                                  DescriptorBindingException,
                                                  ValidationException

      Throws:
        `RouterException`
        `DescriptorBindingException`
        `ValidationException`

    - #### filterExclusiveServices

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

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