net.sbbi.upnp.services
Class ServiceStateVariable

java.lang.Object
  extended bynet.sbbi.upnp.services.ServiceStateVariable
All Implemented Interfaces:
ServiceStateVariableTypes

public class ServiceStateVariable
extends java.lang.Object
implements ServiceStateVariableTypes

Class to contain a service state variable definition

Version:
1.0
Author:
SuperBonBon

Field Summary
 
Fields inherited from interface net.sbbi.upnp.services.ServiceStateVariableTypes
BIN_BASE64, BIN_BASE64_INT, BIN_HEX, BIN_HEX_INT, BOOLEAN, BOOLEAN_INT, CHAR, CHAR_INT, DATE, DATE_INT, DATETIME, DATETIME_INT, DATETIME_TZ, DATETIME_TZ_INT, FIXED_14_4, FIXED_14_4_INT, FLOAT, FLOAT_INT, I1, I1_INT, I2, I2_INT, I4, I4_INT, INT, INT_INT, NUMBER, NUMBER_INT, R4, R4_INT, R8, R8_INT, STRING, STRING_INT, TIME, TIME_INT, TIME_TZ, TIME_TZ_INT, UI1, UI1_INT, UI2, UI2_INT, UI4, UI4_INT, URI, URI_INT, UUID, UUID_INT
 
Method Summary
 java.util.Set getAllowedvalues()
          A set of allowed values (String objects) for the variable
 java.lang.String getDataType()
          The variable UPNP data type
 java.lang.Class getDataTypeAsClass()
          The varialbe JAVA data type (using an UPNP->Java mapping)
static java.lang.Class getDataTypeClassMapping(java.lang.String dataType)
           
 java.lang.String getDefaultValue()
          The default value of the state variable
 java.lang.String getMaximumRangeValue()
          The maximum value as a string
 java.lang.String getMinimumRangeValue()
          The minimum value as a string
 java.lang.String getName()
          State variable name
 UPNPService getParent()
          The parent UPNPService Object
 java.lang.String getStepRangeValue()
          The value step range as a string
static java.lang.String getUPNPDataTypeMapping(java.lang.String className)
           
 java.lang.String getValue()
          Call to the UPNP device to retreive the state variable actual value
 boolean isSendEvents()
          Boolean to indicate if the variable is sending events when value of the var is changing.
static java.lang.Object UPNPToJavaObject(java.lang.String dataType, java.lang.String value)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getValue

public java.lang.String getValue()
                          throws UPNPResponseException,
                                 java.io.IOException
Call to the UPNP device to retreive the state variable actual value

Returns:
the state variable actual value on the device, should be never null, an empty string could be returned by the device
Throws:
UPNPResponseException - if the device throws an exception during query
java.io.IOException - if some IO error with device occurs during query

getName

public java.lang.String getName()
State variable name

Returns:
the state variable name

getParent

public UPNPService getParent()
The parent UPNPService Object

Returns:
the parent object instance

isSendEvents

public boolean isSendEvents()
Boolean to indicate if the variable is sending events when value of the var is changing. The events can be subscribed via the ServicesEventing class

Returns:
true if sending events

getDefaultValue

public java.lang.String getDefaultValue()
The default value of the state variable

Returns:
the default value representation as an string

getDataType

public java.lang.String getDataType()
The variable UPNP data type

Returns:
the data type

getDataTypeAsClass

public java.lang.Class getDataTypeAsClass()
The varialbe JAVA data type (using an UPNP->Java mapping)

Returns:
the class mapped

getAllowedvalues

public java.util.Set getAllowedvalues()
A set of allowed values (String objects) for the variable

Returns:
the allowed values or null if none

getMinimumRangeValue

public java.lang.String getMinimumRangeValue()
The minimum value as a string

Returns:
the minimum value or null if no restriction

getMaximumRangeValue

public java.lang.String getMaximumRangeValue()
The maximum value as a string

Returns:
the maximum value or null if no restriction

getStepRangeValue

public java.lang.String getStepRangeValue()
The value step range as a string

Returns:
the value step raqnge or null if no restriction

getDataTypeClassMapping

public static java.lang.Class getDataTypeClassMapping(java.lang.String dataType)

getUPNPDataTypeMapping

public static java.lang.String getUPNPDataTypeMapping(java.lang.String className)

UPNPToJavaObject

public static java.lang.Object UPNPToJavaObject(java.lang.String dataType,
                                                java.lang.String value)
                                         throws java.lang.Throwable
Throws:
java.lang.Throwable


Copyright © 2005 SuperBonBon Industries. All Rights Reserved.