org.ocap.hn.upnp.common
Interface UPnPService

All Known Subinterfaces:
UPnPAdvertisedService, UPnPClientService, UPnPManagedService

public interface UPnPService

This interface is an abstract representation of a UPnP service. It provides the data constituting a UPnP service that is independent of the network interface on which it has been advertised.


Method Summary
 UPnPAction getAction(String actionName)
          Gets the named action from this service.
 UPnPAction[] getActions()
          Gets the actions that can be used with this service.
 String getServiceId()
          Gets the UPnP serviceId of this service.
 String getServiceType()
          Gets the UPnP serviceType of this service.
 String getSpecVersion()
          Gets the UPnP specVersion major and minor values of this service.
 

Method Detail

getAction

UPnPAction getAction(String actionName)
Gets the named action from this service.

Parameters:
actionName - The name of the UPnPAction to retrieve.
Returns:
The UPnPAction object from this service with the matched name.
Throws:
IllegalArgumentException - if the actionName does not match an action name in this service.

getActions

UPnPAction[] getActions()
Gets the actions that can be used with this service.

Returns:
An array of UPnPActions. If the service has no actions, returns an zero-length array.

getServiceId

String getServiceId()
Gets the UPnP serviceId of this service. This value is taken from the value of the serviceId element within the device description.

Returns:
The serviceId of this service.

getServiceType

String getServiceType()
Gets the UPnP serviceType of this service. This value is taken from the value of the serviceType element within the device description.

Returns:
The type of this service.

getSpecVersion

String getSpecVersion()
Gets the UPnP specVersion major and minor values of this service. This value is taken from the value of the major and minor sub-elements of the specVersion element within the service description. The format of the returned String is the <major> value, followed by '.', followed by the <minor> value.

Returns:
The UPnP specVersion of this service.


Copyright © 2011. All Rights Reserved.