stella.parameter
Class ValueStub

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by stella.parameter.AbstractParameter
                  extended by stella.parameter.ParameterStub
                      extended by stella.parameter.ValueStub
All Implemented Interfaces:
Cloneable, Runnable, Remote, Parameter, Value, CancelRunnable, ExitCleaning, Initializable, LocalizedSupplying, PropertySupplying, Reloadable, ResourceSupplying, RmiListener

public class ValueStub
extends ParameterStub
implements Value

The stub representation for a remote value. The remote value bound to is normally a RemoteSensorSkeleton. This class provides local access to the parameter data.


Nested Class Summary
 
Nested classes/interfaces inherited from class stella.parameter.ParameterStub
ParameterStub.Finger
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
 
Fields inherited from class stella.parameter.ParameterStub
KEY_BLOCK, KEY_FORMATCLASS, KEY_FORMATPATTERN, KEY_INITTRY, KEY_REMOTENAME, KEY_RETRY, KEY_SERVERDELAY, KEY_WAIT, sensor
 
Fields inherited from class stella.parameter.AbstractParameter
KEY_FORMAT, KEY_NAME, KEY_PRESERVE, UNKNOWN
 
Fields inherited from class util.PropertyBundles
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES
 
Fields inherited from class util.PropertyResources
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset
 
Fields inherited from class util.PropertyContainer
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR
 
Fields inherited from interface util.PropertySupplying
CONFIG, KEY_CLASS
 
Fields inherited from interface util.ResourceSupplying
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Constructor Summary
ValueStub(Map prop)
          Constructs a new value stub.
ValueStub(String remotename)
          For convenience, we support a constructor with only the remote name.
 
Method Summary
 Number getValue()
          Casts the parameter value retrieved with ParameterStub.get() to a Number.
 Number setValue(Number val)
          Throws an unsupported operation exception.
 
Methods inherited from class stella.parameter.ParameterStub
cancel, disconnect, exit, get, getAsociatedThread, getFormatted, init, isConnected, maxTimeToCancel, rebind, rescanned, run, set
 
Methods inherited from class stella.parameter.AbstractParameter
createParameter, delivers, getFormatted, getName, getPreserveFile, getString, getString, register, setName, toString
 
Methods inherited from class util.PropertyBundles
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource
 
Methods inherited from class util.PropertyResources
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, keyCreate, keyCreate, reload, setApplet
 
Methods inherited from class util.PropertyContainer
augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, reload, removeProperty, setObject, setProperties, setProperty, stringProperties
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface stella.Parameter
get, getFormatted, getName, getString, set
 
Methods inherited from interface util.PropertySupplying
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties
 
Methods inherited from interface util.Initializable
init
 
Methods inherited from interface util.Reloadable
reload
 
Methods inherited from interface util.ResourceSupplying
getResource, getResourceAsStream, getResources
 

Constructor Detail

ValueStub

public ValueStub(String remotename)
          throws RemoteException
For convenience, we support a constructor with only the remote name.

Throws:
RemoteException

ValueStub

public ValueStub(Map prop)
          throws RemoteException
Constructs a new value stub. This value connects to a remote parameter. The value retrieved must be of Number type.

Throws:
RemoteException
Method Detail

getValue

public Number getValue()
Casts the parameter value retrieved with ParameterStub.get() to a Number. Does not check if the returned value is of type Number.

Specified by:
getValue in interface Value

setValue

public Number setValue(Number val)
Throws an unsupported operation exception. Precisely, calls the parental ParameterStub.set(java.lang.Object) method

Specified by:
setValue in interface Value