public interface UPnPManagedStateVariable extends UPnPStateVariable
Modifier and Type | Method and Description |
---|---|
UPnPAdvertisedStateVariable[] |
getAdvertisedStateVariables()
Gets the network representations of this
UPnPManagedStateVariable . |
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.
|
int |
getModerationDelta()
Gets the moderation delta of this state variable.
|
int |
getModerationInterval()
Gets the moderation interval of this state variable, in
milliseconds.
|
String |
getName()
Gets the name of this UPnP state variable.
|
UPnPManagedService |
getService()
Gets the service that this state variable is a member of.
|
String |
getStepValue()
Gets the allowedValueRange step value for this UPnP state variable.
|
String |
getValue()
Reports the current value of this
UPnPManagedStateVariable . |
boolean |
isEvented()
Indicates if this state variable is evented.
|
void |
setModerationDelta(int delta)
Sets the moderation delta of this state variable.
|
void |
setModerationInterval(int interval)
Sets the moderation interval of this state variable, in
milliseconds.
|
void |
setValue(String value)
Sets the value of this state variable.
|
void setValue(String value) throws SecurityException
UPnPManagedStateVariable
is evented the host will send the appropriate UPnP event,
subject to the moderation constraints set for this
UPnPManagedStateVariable
.value
- The new value of the state variable.IllegalArgumentException
- if value
violates the
constraints of this variable's allowedValueList
or
allowedValueRange
, or does not
conform to the required format of the state variable's dataType
as indicated by the UPnP Device Architecture Specification.SecurityException
- if the calling application has not been
granted MonitorAppPermission("handler.homenetwork").getAllowedValues()
,
getMinimumValue()
,
getMaximumValue()
,
getDataType()
String getValue()
UPnPManagedStateVariable
.
This method will return the most recent value specified by
setValue(java.lang.String)
, or the variable's default value if its value has
not been set.UPnPManagedStateVariable
.void setModerationInterval(int interval) throws SecurityException
interval
- New moderation interval of the state
variable, in milliseconds. A value of zero
indicates unmoderated.UnsupportedOperationException
- if the corresponding
UPnPStateVariable
is not evented.IllegalArgumentException
- if interval
is negative.SecurityException
- if the calling application has not been
granted MonitorAppPermission("handler.homenetwork").int getModerationInterval()
UPnPManagedStateVariable
in
milliseconds. A value of zero indicates unmoderated.UnsupportedOperationException
- if the corresponding
UPnPStateVariable
is not evented.void setModerationDelta(int delta) throws SecurityException
delta
- New moderation delta of the state
variable. A value of zero indicates
unmoderated.UnsupportedOperationException
- if the state variable is not
evented or if the data type of this variable is not numeric.IllegalArgumentException
- if delta
is negative.SecurityException
- if the calling application has not been
granted MonitorAppPermission("handler.homenetwork").getDataType()
int getModerationDelta()
UPnPManagedStateVariable
. A value of
zero indicates unmoderated.UnsupportedOperationException
- if the corresponding
UPnPStateVariable
is not evented.UPnPAdvertisedStateVariable[] getAdvertisedStateVariables()
UPnPManagedStateVariable
.
Since the UPnP service description contains
information specific to the network interface on which it is advertised,
there can be multiple UPnPAdvertisedStateVarable
objects
associated with a single UPnPManagedStateVariable
.UPnPManagedStateVariable
. Returns a zero-length array if
the corresponding UPnP service has not been advertised on a network
interface.UPnPManagedService getService()
UPnPManagedService
that this state
variable is a member of.String[] getAllowedValues()
allowedValueList
element definition. If the
UPnPStateVariable
does not have an
allowedValueList specified, returns zero length array.getAllowedValues
in interface UPnPStateVariable
getAdvertisedStateVariables()[0].getAllowedValues()
.String getDefaultValue()
defaultValue
element in
the UPnP service description that defines this state variable.getDefaultValue
in interface UPnPStateVariable
getAdvertisedStateVariables()[0].getDefaultValue()
.String getMaximumValue()
allowedValueRange
maximum element definition.getMaximumValue
in interface UPnPStateVariable
String
containing the maximum allowed
value for this state variable. Returns an empty
string if the variable does not have an
allowedValueRange.
If the corresponding UPnP service has been advertised,
this method returns the same value
as getAdvertisedStateVariables()[0].getMaximumValue()
.String getMinimumValue()
allowedValueRange
minimum element definition.getMinimumValue
in interface UPnPStateVariable
String
containing the minimum allowed
value for this state variable. Returns an empty
string if the variable does not have an
allowedValueRange.
If the corresponding UPnP service has been advertised,
this method returns the same value
as getAdvertisedStateVariables()[0].getMinimumValue()
.String getName()
name
element of
the UPnP service description stateVariable
element.getName
in interface UPnPStateVariable
getAdvertisedStateVariables()[0].getName()
.String getDataType()
dataType
element definition.getDataType
in interface UPnPStateVariable
getAdvertisedStateVariables()[0].getStateVariableType()
.String getStepValue()
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.
getStepValue
in interface UPnPStateVariable
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.
If the corresponding UPnP service has been advertised,
this method returns the same value
as getAdvertisedStateVariables()[0].getStepValue()
.boolean isEvented()
sendEvents
attribute in the
UPnP service description that defines this state variable.isEvented
in interface UPnPStateVariable
getAdvertisedStateVariables()[0].isEvented()
.Copyright © 2013 CableLabs. All rights reserved.