org.teleal.cling.model.profile
Class HeaderDeviceDetailsProvider

java.lang.Object
  extended by org.teleal.cling.model.profile.HeaderDeviceDetailsProvider
All Implemented Interfaces:
DeviceDetailsProvider

public class HeaderDeviceDetailsProvider
extends Object
implements DeviceDetailsProvider

Selects device details based on a regex and the control points 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
static class HeaderDeviceDetailsProvider.Key
           
 
Constructor Summary
HeaderDeviceDetailsProvider(DeviceDetails defaultDeviceDetails)
           
HeaderDeviceDetailsProvider(DeviceDetails defaultDeviceDetails, Map<HeaderDeviceDetailsProvider.Key,DeviceDetails> headerDetails)
           
 
Method Summary
 DeviceDetails getDefaultDeviceDetails()
           
 Map<HeaderDeviceDetailsProvider.Key,DeviceDetails> getHeaderDetails()
           
 DeviceDetails provide(ControlPointInfo 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(ControlPointInfo info)
Specified by:
provide in interface DeviceDetailsProvider


Copyright © 2011 Teleal GmbH, Switzerland. All Rights Reserved.