stella
Interface StatusRequesting
- All Superinterfaces:
- ErrorDependingParameter, Initializable, Parameter, PropertySupplying
- All Known Implementing Classes:
- AbstractStatusRequestor, AltTelescope, AzTelescope, FocusPosition, MirrorTemperature, PowerTelescope, TelescopeError
public interface StatusRequesting
- extends ErrorDependingParameter
An interface that signals that this parameter obtains its value from an
ErrorEvent, normally a status event, sent from the devices
and
that this value is linked to a changing parameter. An example is the alt/az
position of the telescope, which is sent in a
TelescopeStatus, but is changing as long as the
telescope is moving. To nevertheless get a most accurate value, this
parameter directly urges the registered CommandLaunching
instance to send a command to its server, which is then followed by an
ErrorEvent. This error-event is caught by the parameter serving
cluster and piped to this parameter as a response. Now, the value of
this parameter is updated and returned. To make this complicated schema a
little bit more applicible, mind the following:
- Values are cached. As long as the current time is close enough to
the last update time, this cached value is returned.
- If the cached value is considered inaccurate, the command/error-event
cycle is launched. This implies that the
Parameter.get() method will
introduce a certain latency, i.e. it may take some time until it
returns.
- For applications that do not need accurate values, the
getCache() can be used. This will always return fast.
| 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 |
registerLauncher
boolean registerLauncher(CommandLaunching launch)
- Registers a command launching instance to this parameter. It is the
responsibility of the parameter to know, if the instance handed over is
the right one. Parameter clusters will always pass all of their
CommandLaunching instances to its status requesting parameters.
- Returns:
- True, if this is the coorect command launcher.
getCache
Object getCache()
- Returns the cached parameter value. For applications that do not need
an accurate value, like visualization tools.
getCacheFormatted
String getCacheFormatted()
- Returns the cache entry as a string, formatted e.g. to be displayed in
a panel.