org.fourthline.cling.model.profile

## Class HeaderDeviceDetailsProvider

- java.lang.Object
- - org.fourthline.cling.model.profile.HeaderDeviceDetailsProvider

- All Implemented Interfaces:
    DeviceDetailsProvider

      public class HeaderDeviceDetailsProvider
      extends Object
      implements DeviceDetailsProvider

  Selects device details based on a regex and the client's HTTP headers.

  This provider will lookup and match a `DeviceDetails` entry in a given map that is keyed by HTTP header name and a regular expression pattern. If the control point sent an HTTP header that matches an entry's name, and the value of the control points header matches the pattern of the entry, the value of the entry is applied. This is a case-insensitive pattern match.

  Author:
    Mario Franco, Christian Bauer

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `HeaderDeviceDetailsProvider.Key`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HeaderDeviceDetailsProvider(DeviceDetails defaultDeviceDetails)`
    `HeaderDeviceDetailsProvider(DeviceDetails defaultDeviceDetails, Map<HeaderDeviceDetailsProvider.Key,DeviceDetails> headerDetails)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `DeviceDetails` | `getDefaultDeviceDetails()`
    `Map<HeaderDeviceDetailsProvider.Key,DeviceDetails>` | `getHeaderDetails()`
    `DeviceDetails` | `provide(RemoteClientInfo info)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### HeaderDeviceDetailsProvider

          public HeaderDeviceDetailsProvider(DeviceDetails defaultDeviceDetails)

    - #### HeaderDeviceDetailsProvider

          public HeaderDeviceDetailsProvider(DeviceDetails defaultDeviceDetails,
                                             Map<HeaderDeviceDetailsProvider.Key,DeviceDetails> headerDetails)

  - ### Method Detail

    - #### getDefaultDeviceDetails

          public DeviceDetails getDefaultDeviceDetails()

    - #### getHeaderDetails

          public Map<HeaderDeviceDetailsProvider.Key,DeviceDetails> getHeaderDetails()

    - #### provide

          public DeviceDetails provide(RemoteClientInfo info)

      Specified by:
        `provide` in interface `DeviceDetailsProvider`

Copyright © 2016 4th Line GmbH, Switzerland. All rights reserved.