YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
org.fourthline.cling.model.Namespace Class Reference

Enforces path conventions for all locally offered resources (descriptors, icons, etc.) More...

Collaboration diagram for org.fourthline.cling.model.Namespace:
Collaboration graph

Public Member Functions

 Namespace (String basePath)
 
 Namespace (URI basePath)
 
URI getBasePath ()
 
URI getPath (Device device)
 
URI getPath (Service service)
 
URI getDescriptorPath (Device device)
 
String getDescriptorPathString (Device device)
 Performance optimization, avoids URI manipulation.
 
URI getDescriptorPath (Service service)
 
URI getControlPath (Service service)
 
URI getIconPath (Icon icon)
 
URI getEventSubscriptionPath (Service service)
 
URI getEventCallbackPath (Service service)
 
String getEventCallbackPathString (Service service)
 Performance optimization, avoids URI manipulation.
 
URI prefixIfRelative (Device device, URI uri)
 
boolean isControlPath (URI uri)
 
boolean isEventSubscriptionPath (URI uri)
 
boolean isEventCallbackPath (URI uri)
 
Resource[] getResources (Device device) throws ValidationException
 

Static Public Attributes

static final String DEVICE = "/dev"
 
static final String SERVICE = "/svc"
 
static final String CONTROL = "/action"
 
static final String EVENTS = "/event"
 
static final String DESCRIPTOR_FILE = "/desc"
 
static final String CALLBACK_FILE = "/cb"
 

Protected Member Functions

URI appendPathToBaseURI (String path)
 
String getDevicePath (Device device)
 
String getServicePath (Service service)
 

Protected Attributes

final URI basePath
 
final String decodedPath
 

Detailed Description

Enforces path conventions for all locally offered resources (descriptors, icons, etc.)

Every descriptor, icon, event callback, or action message is send to a URL. This namespace defines how the path of this URL will look like and it will build the path for a given resource.

By default, the namespace is organized as follows:


http://host:port/dev/<udn>/desc.xml
http://host:port/dev/<udn>/svc/<svcIdNamespace>/<svcId>/desc.xml
http://host:port/dev/<udn>/svc/<svcIdNamespace>/<svcId>/action
http://host:port/dev/<udn>/svc/<svcIdNamespace>/<svcId>/event
http://host:port/dev/<ThisIsEitherRootUDN>/svc/<svcIdNamespace>/<svcId>/event/cb.xml
http://host:port/dev/<OrEvenAnEmbeddedDevicesUDN>/svc/<svcIdNamespace>/<svcId>/action
...

<p<blockquote>‍

The namespace is also used to discover and create all org.fourthline.cling.model.resource.Resources given a org.fourthline.cling.model.meta.Device's metadata. This procedure is typically invoked once, when the device is added to the org.fourthline.cling.registry.Registry.

Author
Christian Bauer

The documentation for this class was generated from the following file: