org.ocap.hn.upnp.common
Interface UPnPStateVariable

All Known Subinterfaces:
UPnPAdvertisedStateVariable, UPnPClientStateVariable, UPnPManagedStateVariable

public interface UPnPStateVariable

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


Method Summary
 String[] getAllowedValues()
          Gets the allowed values for this UPnP state variable.
 String getDataType()
          Gets the data type of this UPnP state variable.
 String getDefaultValue()
          Reports the default value of this UPnP state variable.
 String getMaximumValue()
          Gets the allowedValueRange maximum value of this UPnP state variable.
 String getMinimumValue()
          Gets the allowedValueRange minimum value for this UPnP state variable.
 String getName()
          Gets the name of this UPnP state variable.
 String getStepValue()
          Gets the allowedValueRange step value for this UPnP state variable.
 boolean isEvented()
          Indicates if this state variable is evented.
 

Method Detail

getAllowedValues

String[] getAllowedValues()
Gets the allowed values for this UPnP state variable. The value returned is formatted per the UPnP Device Architecture specification, service description, allowedValueList element definition. If the UPnPStateVariable does not have an allowedValueList specified, returns zero length array.

Returns:
An array containing the allowed values for this state variable. Each element in the array contains the value of one allowedValue element in the allowedValueList. The array has the same order as the allowedValueList element.

getDefaultValue

String getDefaultValue()
Reports the default value of this UPnP state variable. This value is taken from the defaultValue element in the UPnP service description that defines this state variable.

Returns:
The default value of this state variable. Returns an empty string if the variable does not have a defaultValue.

getMaximumValue

String getMaximumValue()
Gets the allowedValueRange maximum value of this UPnP state variable. The value returned is formatted per the UPnP Device Architecture specification, service description, allowedValueRange maximum element definition.

Returns:
A String containing the maximum allowed value for this state variable. Returns an empty string if the variable does not have an allowedValueRange.

getMinimumValue

String getMinimumValue()
Gets the allowedValueRange minimum value for this UPnP state variable. The value returned is formatted per the UPnP Device Architecture specification, service description, allowedValueRange minimum element definition.

Returns:
A String containing the minimum allowed value for this state variable. Returns an empty string if the variable does not have an allowedValueRange.

getName

String getName()
Gets the name of this UPnP state variable. This value is taken from the name element of the UPnP service description stateVariable element.

Returns:
The name of the state variable.

getDataType

String getDataType()
Gets the data type of this UPnP state variable. The value returned is formatted per the UPnP Device Architecture specification, service description, dataType element definition.

Returns:
The data type of the state variable.

getStepValue

String getStepValue()
Gets the allowedValueRange step value for this UPnP state variable. The value returned is formatted per the UPnP Device Architecture specification, service description, allowedValueRange step element definition.

Note that if the step element is omitted and the data type of the state variable is an integer, the step value is considered to be 1.

Returns:
A String containing the step value for this state variable. Returns an empty string if service description of this variable does not specify a step value.

isEvented

boolean isEvented()
Indicates if this state variable is evented. The value is taken from the sendEvents attribute in the UPnP service description that defines this state variable.

Returns:
True if this UPnP state variable is evented, otherwise returns false.


Copyright © 2011. All Rights Reserved.