Top Description Fields Methods
org.osgi.service.upnp

public Interface UPnPService


A representation of a UPnP Service. Each UPnP device contains zero or more services. The UPnP description for a service defines actions, their arguments, and event characteristics.
Author
$Id: 8a430d12a3100d60e2b736da1241be735aee480e $

Field Summary

Modifier and TypeField and Description
public static final String
ID

Property key for the optional service id. The service id property is used when registering UPnP Device services or UPnP Event Listener services.

public static final String
TYPE

Property key for the optional service type uri.

Method Summary

Modifier and TypeMethod and Description
public UPnPAction

Returns:

The requested action or null if no action is found.
getAction
(String
Name of action. Must not contain hyphen or hash characters. Should be < 32 characters.
name
)

Locates a specific action by name.

public UPnPAction[]

Returns:

Array of actions (UPnPAction[] )or null if no actions are defined for this service.
getActions
()

Lists all actions provided by this service.

public String

Returns:

The service ID suffix defined by a UPnP Forum working committee or specified by a UPnP vendor. Must be <= 64 characters. Single URI.
getId
()

Returns the serviceId field in the UPnP service description.

public UPnPStateVariable

Returns:

State variable or null if no such state variable exists for this service.
getStateVariable
(String
Name of the State Variable
name
)

Gets a UPnPStateVariable objects provided by this service by name

public UPnPStateVariable[]

Returns:

Array of state variables or null if none are defined for this service.
getStateVariables
()

Lists all UPnPStateVariable objects provided by this service.

public String

Returns:

The service type suffix defined by a UPnP Forum working committee or specified by a UPnP vendor. Must be <= 64 characters, not including the version suffix and separating colon. Single URI.
getType
()

Returns the serviceType field in the UPnP service description.

public String

Returns:

The integer service version defined by a UPnP Forum working committee or specified by a UPnP vendor.
getVersion
()

Returns the version suffix encoded in the serviceType field in the UPnP service description.

Field Detail

IDback to summary
public static final String ID

Property key for the optional service id. The service id property is used when registering UPnP Device services or UPnP Event Listener services. The value of the property contains a String array (String[]) of service ids. A UPnP Device service can thus announce what service ids it contains. A UPnP Event Listener service can announce for what UPnP service ids it wants notifications. A service id does not have to be universally unique. It must be unique only within a device. A null value is a wildcard, matching all services. The value is "UPnP.service.id".

TYPEback to summary
public static final String TYPE

Property key for the optional service type uri. The service type property is used when registering UPnP Device services and UPnP Event Listener services. The property contains a String array (String[]) of service types. A UPnP Device service can thus announce what types of services it contains. A UPnP Event Listener service can announce for what type of UPnP services it wants notifications. The service version is encoded in the type string as specified in the UPnP specification. A null value is a wildcard, matching all service types. Value is "UPnP.service.type".

See Also
UPnPService#getType()

Method Detail

getActionback to summary
public UPnPAction getAction(String name)

Locates a specific action by name. Looks up an action by its name.

Parameters
name:String

Name of action. Must not contain hyphen or hash characters. Should be < 32 characters.

Returns:UPnPAction

The requested action or null if no action is found.

Exceptions
IllegalStateException:
if the UPnP service has been removed from the network.
getActionsback to summary
public UPnPAction[] getActions()

Lists all actions provided by this service.

Returns:UPnPAction[]

Array of actions (UPnPAction[] )or null if no actions are defined for this service.

Exceptions
IllegalStateException:
if the UPnP service has been removed from the network.
getIdback to summary
public String getId()

Returns the serviceId field in the UPnP service description.

For standard services defined by a UPnP Forum working committee, the serviceId must contain the following components in the indicated order:

  • urn:upnp-org:serviceId:
  • service ID suffix
Example: urn:upnp-org:serviceId:serviceID.

Note that upnp-org is used instead of schemas-upnp-org in this example because an XML schema is not defined for each serviceId.

For non-standard services specified by UPnP vendors, the serviceId must contain the following components in the indicated order:

  • urn:
  • ICANN domain name owned by the vendor
  • :serviceId:
  • service ID suffix
Example: urn:domain-name:serviceId:serviceID.

This method must continue to return the service id after the UPnP service has been removed from the network.

Returns:String

The service ID suffix defined by a UPnP Forum working committee or specified by a UPnP vendor. Must be <= 64 characters. Single URI.

getStateVariableback to summary
public UPnPStateVariable getStateVariable(String name)

Gets a UPnPStateVariable objects provided by this service by name

Parameters
name:String

Name of the State Variable

Returns:UPnPStateVariable

State variable or null if no such state variable exists for this service.

Exceptions
IllegalStateException:
if the UPnP service has been removed from the network.
getStateVariablesback to summary
public UPnPStateVariable[] getStateVariables()

Lists all UPnPStateVariable objects provided by this service.

Returns:UPnPStateVariable[]

Array of state variables or null if none are defined for this service.

Exceptions
IllegalStateException:
if the UPnP service has been removed from the network.
getTypeback to summary
public String getType()

Returns the serviceType field in the UPnP service description.

For standard services defined by a UPnP Forum working committee, the serviceType must contain the following components in the indicated order:

  • urn:schemas-upnp-org:service:
  • service type suffix:
  • integer service version
Example: urn:schemas-upnp-org:service:serviceType:v.

For non-standard services specified by UPnP vendors, the serviceType must contain the following components in the indicated order:

  • urn:
  • ICANN domain name owned by the vendor
  • :service:
  • service type suffix:
  • integer service version
Example: urn:domain-name:service:serviceType:v.

This method must continue to return the service type after the UPnP service has been removed from the network.

Returns:String

The service type suffix defined by a UPnP Forum working committee or specified by a UPnP vendor. Must be <= 64 characters, not including the version suffix and separating colon. Single URI.

getVersionback to summary
public String getVersion()

Returns the version suffix encoded in the serviceType field in the UPnP service description.

This method must continue to return the service version after the UPnP service has been removed from the network.

Returns:String

The integer service version defined by a UPnP Forum working committee or specified by a UPnP vendor.