stella.ccd
Class AbstractCCDParameter

java.lang.Object
  extended by util.PropertyContainer
      extended by stella.parameter.AbstractParameter
          extended by stella.parameter.AbstractRemoteParameter
              extended by stella.ccd.AbstractCCDParameter
All Implemented Interfaces:
DriverDepending, Cloneable, Remote, Parameter, RemoteParameter, ExitCleaning, Initializable, PropertyBearing, RmiCaster
Direct Known Subclasses:
AbstractCCDValue

public abstract class AbstractCCDParameter
extends AbstractRemoteParameter
implements DriverDepending

A intermittent class that bundels a common requirement of all ccd parameters. All parameters are remote enabled, as they should serve as parameters for sensors. It allows the adding of a CcdDriver object, as all ccd parameters get their information from this parameters class.


Nested Class Summary
 
Nested classes/interfaces inherited from class util.PropertyContainer
PropertyContainer.URLResource
 
Field Summary
private static CcdDriver camera
          The static reference to the main camera object.
private static Map cameracache
          The cached camera info.
private static long DEFCACHETIME
          The default caching time for camera queries.
static String DEFCAMERANAME
          The default name of the CCD.
static String KEY_CACHETIME
          The default caching time for camera queries.
static String KEY_CAMERANAME
          The default name of the CCD.
private static long lastcache
          The time the camera was queried last.
 
Fields inherited from class stella.parameter.AbstractRemoteParameter
DEFBIND, KEY_BIND
 
Fields inherited from class stella.parameter.AbstractParameter
KEY_FORMAT, KEY_NAME, KEY_PRESERVE, UNKNOWN
 
Fields inherited from class util.PropertyContainer
KEY_LISTSEPARATOR, KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR, KEY_NOINITONCREATE, KEY_RESOURCEBUNDLES
 
Fields inherited from interface util.PropertyBearing
CONFIG, KEY_CLASS, KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Constructor Summary
protected AbstractCCDParameter(Map info)
          Protected constructor for constructor chaining.
 
Method Summary
 Object get()
          Checks, if a camera reference is given.
protected abstract  Object getFromCamera(Map ccd)
          Uses a reference to the camera object to return the requested value.
 boolean registerDriver(Driver ccd)
          Registers the main camera object to this parameter.
 Object set(Object newval)
          Setting of the parameter is not allowed.
private static void updateCache()
          Updates the cache.
 
Methods inherited from class stella.parameter.AbstractRemoteParameter
addRmiListener, bindToRegistry, exit, init, isValid, remoteGet, removeRmiListener, rescanned, unbindFromRegistry
 
Methods inherited from class stella.parameter.AbstractParameter
createParameter, delivers, getFormatted, getFormatted, getName, getPreserveFile, getString, getString, register, setName, toString
 
Methods inherited from class util.PropertyContainer
augment, augment, augment, clone, createFrom, createFrom, createFrom, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getLocalClassLoader, getLocalized, getLocalized, getLocalizedString, getLocalizedString, getProperties, getPropertiesToKey, getPropertiesToKey, getProperty, getResource, getResourceAsStream, getResourceFromKey, getResources, has, isNew, keyCreate, keyCreate, parseObject, reload, 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 util.PropertyBearing
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getLocalized, getProperties, getProperty, getResource, getResourceAsStream, getResources, has, parseObject, removeProperty, setObject, setProperty, stringProperties
 

Field Detail

KEY_CAMERANAME

public static final String KEY_CAMERANAME
The default name of the CCD.

See Also:
Constant Field Values

KEY_CACHETIME

public static final String KEY_CACHETIME
The default caching time for camera queries.

See Also:
Constant Field Values

DEFCAMERANAME

public static final String DEFCAMERANAME
The default name of the CCD.

See Also:
Constant Field Values

DEFCACHETIME

private static final long DEFCACHETIME
The default caching time for camera queries.

See Also:
Constant Field Values

camera

private static CcdDriver camera
The static reference to the main camera object.


lastcache

private static long lastcache
The time the camera was queried last.


cameracache

private static Map cameracache
The cached camera info.

Constructor Detail

AbstractCCDParameter

protected AbstractCCDParameter(Map info)
Protected constructor for constructor chaining.

Method Detail

registerDriver

public boolean registerDriver(Driver ccd)
Registers the main camera object to this parameter. Must be called prior to data retrieval.

Specified by:
registerDriver in interface DriverDepending
Returns:
True if registering at the driver was successful.

get

public Object get()
Checks, if a camera reference is given. If not, null is returned.

Specified by:
get in interface Parameter

set

public Object set(Object newval)
Setting of the parameter is not allowed. Some of the values might be changed, but only via CcdCommands.

Specified by:
set in interface Parameter
Returns:
The previous value of this parameter.
Throws:
UnsupportedOperationException

getFromCamera

protected abstract Object getFromCamera(Map ccd)
Uses a reference to the camera object to return the requested value.


updateCache

private static void updateCache()
Updates the cache.