|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.PropertyContainer
util.PropertyResources
util.PropertyBundles
util.rmi.RmiPropertyContainer
util.rmi.AbstractRmiCaster
stella.CastingContainer
stella.MasterMind
public class MasterMind
The entry class for the STELLA-SCS control system. Starting this class with
java stella.MasterMind [properties.file]launches the STELLA-SCS. The following properties are stored within the file, specified with these keys. Note that all keys linked to properties files (
KEY_RECEIVER, KEY_RENDER, KEY_GLOBAL,
KEY_ERROR, KEY_SEQUENCER, KEY_SCHEDULER, and
KEY_LOGGER) require that a class is present in these
properties. Only the most important keys are explained.
KEY_RECEIVER (required): Matches to a comma-seperated list of
properties files used to construct the command servers. The properties
objects loaded from the specified files are used as an argument to the
appropriate command servers. The properties must contain a class key that is
used by the AbstractCommandLauncher class to actually instantiate the
command server. Note that after construction, the command launcher must be
ready to send commands. The number of property files in the list determines
the number of command servers visible for the master mind. Note that due to
the use of a single class as the command-server class, the properties of the
generated objects must determine the type of command the server is willing to
accept, see CommandLaunching.handles(stella.CommandEvent).KEY_RENDER (required): Links to the properties of a
CommandRendering instance. This object is needed to convert generic
sequencer steps to actual commands. E.g. positioning the telescope has a
generic move telescope in the sequence steps, but the actual
position has to be derived from the actual target. The command renderer does
this job.KEY_GLOBAL (required): A parameter cluster that combines all
data necessary for sequencing and scheduling. It comprises all data
known to the system, ranging from weather data to telescope position.KEY_ERROR (required): The object responsible for error handling
it must have access to the current observation sequence to take appropriate
updates in the sequence if errors occur.KEY_SEQUENCER (required): This must point to a properties file
describing an instantiable class implementing the Sequencing
interface. Again, the class definition used for instantiating must be given
in the properties file.KEY_SCHEDULER (required): Points to a properties file describing
an instantiable class implementing the Scheduling interface. Again,
the class definition used for instantiating must be given in the properties
file.KEY_SERVER (optional): Allows the inclusion of a socket-based
parameter server to the master mind. Java-based apllications may query the
parameters directly. A parameter server listens on a specific port for
parameter value requests. On query, the name of the parameter is read in from
a socket connection and its value is writtn to it.KEY_LOGGER (optional): Points to a comma separated list of
instantiable classes implementing the Logging interface. Loggers are
created via a call to the AbstractLogger.createLogger(java.util.Map) method, using
the properties found in the list as arguments. All exisitng casters, i.e. the
command servers, the weather watcher, its sensors and the sequencer and
scheduler if these two classes are casters, are registered to the loggers.KEY_SIMULATE. In
simulation mode, the only differences to normal action are
| Nested Class Summary | |
|---|---|
private static class |
MasterMind.Stamp
Class that holds the unique id plus the time stamp. |
| Nested classes/interfaces inherited from class util.PropertyResources |
|---|
PropertyResources.URLResource |
| Field Summary | |
|---|---|
private boolean |
cancel
True if the master mind should stop. |
private static int |
CLEANSEPRIORITY
The priority at which ExitCleaning on this should occur. |
private static boolean |
DEFBIND
The default auto-binding as a RemoteParameter. |
private static String |
DEFBINDNAME
Default binding name for a target mangager. |
private static long |
DEFCANCELTIME
The default maximal wait for cancel time-out. |
private static boolean |
DEFCLEANONEXIT
Defaults adds a shutdown hook. |
private static long |
DEFCOOLDOWN
The default sleeping intervall, ms (600000). |
private static long |
DEFINITDELAY
The default delay before starting the master mind. |
private static String |
DEFLOGGERGROUP
The default name of the device trigger thread group (devicetrigger). |
private static long |
DEFRUNTIME
If true, master mind is in simulation modus. |
private static boolean |
DEFSIMULATE
If true, master mind is in simulation modus. |
private static long |
DEFSLEEP
The default sleeping intervall, ms (600000). |
private static String |
DEFSTELLA
Default STELLA identifier. |
private static String |
DEFTIME
The default name of the time parameter. |
private static long |
DEFTIMEOUT
The default maximal wait for sequence completion, ms (12h). |
private static String |
DEFTOO
The default name of the time parameter. |
private static long |
DEFTOOALIVE
The default time a ToO is active (=able to be picked). |
private static String |
DEFTWILIGHT
The default name of the time parameter. |
private static String |
DEFUNIQUE
The default target list parameter. |
private static String |
DEFURL
The default name of the url parameter. |
private Timer |
devicetimer
The timer the device triggers run in. |
private ErrorHandling |
errorhandler
The actual error handler object used. |
private ParameterServer |
globalserver
The parameter server if any. |
private Map<String,ParsedTarget> |
grb
A lookup table for ToOs. |
static String |
GRBTEMPLATE
|
private static int |
HANDLERPRIORITY
The priority at ExitCleaning on error handler should occur. |
private static boolean |
idle
A logging flag. |
static String |
KEY_BIND
The key in the Map for auto-binding of the trigger. |
static String |
KEY_CANCELTIME
The maximal wait for one sequence completion. |
static String |
KEY_CLEANONEXIT
True, if the exit cleaner should act as a shutdown-hook. |
static String |
KEY_COOLDOWN
The coll-down time after one object was finished. |
static String |
KEY_ERROR
The key matching to the properties of the error handler. |
static String |
KEY_GLOBAL
The key matching to the properties of the global parameter set. |
static String |
KEY_INITDELAY
The sleep period before starting the master mind. |
static String |
KEY_LOCALWEATHER
The key matching to the properties of a local weather station. |
static String |
KEY_LOGGER
The key matching to the list of logger to use. |
static String |
KEY_LOGGERGROUP
The key to the name of the device trigger thread group. |
static String |
KEY_RANKMONITOR
An object that records and stores the scheduling history. |
static String |
KEY_RECEIVER
The key to the properties of the service provider. |
static String |
KEY_RENDER
The key to the properties of the template to command translater. |
static String |
KEY_RUNTIME
The maximum run-time, zero is run forever. |
static String |
KEY_SCHEDULER
The key matching to the properties of the scheduler. |
static String |
KEY_SEQUENCER
The key matching to the properties of the sequencer. |
static String |
KEY_SERVER
The key matching to the properties of the global parameter set. |
static String |
KEY_SIMULATE
If true, simulation modi is invoked. |
static String |
KEY_SLEEP
The maximal sleep period between unsuccessful scheduler querries. |
static String |
KEY_STELLA
The key to the telescope identifier. |
static String |
KEY_TARGETLIST
The key matching to the target list parameter. |
static String |
KEY_THREADNAME
The key matching to this master mind's thread name. |
static String |
KEY_TIME
The name of the time parameter to use. |
static String |
KEY_TIMEOUT
The maximal wait for one sequence completion. |
static String |
KEY_TOO
The name of the too trigger to use. |
static String |
KEY_TOOALIVE
The time a ToO is active. |
static String |
KEY_TWILIGHT
The name of the twilight parameter to use. |
static String |
KEY_UNIQUE
The key matching to the unique parameter. |
static String |
KEY_URL
The name of the CCD-data URL parameter to use. |
private static int |
LAUNCHERPRIORITY
The priority at which ExitCleaning on command handlers occur. |
static Object |
LOCK
A locking object for various purposes. |
private static ThreadGroup |
loggergroup
The thread group the loggers run in. |
private Logging[] |
loggers
The loggers to use. |
private static MasterMind |
mastermind
The static reference to the single master mind that is running. |
private static int |
MASTERPRIORITY
The priority at ExitCleaning on error handler should occur. |
private static Thread |
masterthread
The thread the master mind runs in. |
private ParameterClustering |
parameters
The global parameter set. |
private RankingMonitor |
rank
If we are moitoring the target's rankings. |
private CommandRendering |
render
The command rendering object. |
private Scheduling |
scheduler
The actual scheduling object used. |
private Sequencing |
sequencer
The actual sequencer object used. |
private static int |
SEQUENCERPRIORITY
The priority at which ExitCleaning on sequencer should occur. |
private CommandLaunching[] |
servers
The array of command servers from the KEY_RECEIVER list. |
private TargetProviding<TargetDefinition> |
targetlist
The global parameter set. |
private Map<TargetDefinition,MasterMind.Stamp> |
timetable
A list of all targets in and their pick time. |
private WeatherSurveying |
weather
A local weather station. |
| Fields inherited from class util.rmi.AbstractRmiCaster |
|---|
ALTERNATEHOST, ALTERNATEPORT, KEY_BINDNAME, KEY_EXPORTPORT, KEY_REGISTRYHOST, KEY_REGISTRYPORT |
| 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.ResourceSupplying |
|---|
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME |
| Fields inherited from interface util.PropertySupplying |
|---|
CONFIG, KEY_CLASS |
| Constructor Summary | |
|---|---|
MasterMind(Map<String,String> prop)
Constructs a new master mind with the given properties. |
|
| Method Summary | |
|---|---|
boolean |
addMeritLog(String newtd)
Adds a single target for extensive merit logging. |
boolean |
addTarget(TargetDefinition dom)
Remote interface for adding targets. |
private void |
advanceTime(long sleep)
Advances the time if the time parameter is a SettableTime object. |
void |
cancel()
Cancels execution of the master mind program. |
void |
exit()
On exit, cancel me and exit all exit-cleaning sub-objects. |
private String |
formatTime()
If we run in simulator mode, we return a formatted version of the simulator time here, otherwise we return an empty string. |
Collection<String> |
getActive()
Returns all active IDs. |
Collection<TargetDefinition> |
getAllTargets()
Returns a collection of all targets. |
Thread |
getAsociatedThread()
Returns the thread asociated with the master mind. |
private static double |
getFreeMemory()
Returns the free memory in k-bytes. |
long |
getRefreshInterval()
Refresh intervall is one day. |
TargetDefinition |
getTarget(String name)
Returns a single target specified by its name. |
String |
getTelescope()
For remote queries on the telescope we operate. |
private long |
getTime()
Returns the current time as a Long. |
private Unique |
getUnique()
Returns the unique parameter. |
void |
init()
Inits the master mind. |
protected void |
initOptional()
Initializes optional components of the master mind. |
protected void |
initRequired()
Initializes the required components of the master mind. |
boolean |
isFixedRate()
Always do this prior to nightfall. |
static boolean |
isIdle()
Returns true, if last scheduler query has returned null. |
List<String> |
listAllTargets()
Lists the name of all targets. |
static void |
main(String[] arg)
Starts the master mind with a Properties object constructed out of the first argument or with the default properties if no argument is given. |
long |
maxTimeToCancel()
Returns the maximum time the master mind will need for canceling its thread. |
static boolean |
nighttime()
Returns true, if the master mind thinks its night. |
Object |
provideStatus()
Returns a status from the master. |
void |
refresh()
Each night we clear the target list from surviving left-overs before proceeding. |
boolean |
reloadTargets()
Reloads all targets. |
void |
removeAllTargets()
Removes all targets. |
boolean |
removeMeritLog(String newtd)
Removes the target from the scheduler's list. |
boolean |
removeTarget(String name)
Remote interface for removing a target having the name. |
boolean |
removeToo(String name)
Removes the target from the scheduler's list. |
void |
rmiAddParameter(URL resource)
Adds a parameter that is loadable from the given resource. |
Object |
rmiGet(String name)
Returns the parameter's value as an object. |
Set |
rmiGetAllParameterNames()
Returns all names of the parameters this parameter set serves, tailored for rmi-access. |
Object |
rmiProvideStatus()
Returns a status from the master. |
void |
rmiRemoveParameter(String name)
Removes the parameter with the given name. |
Object |
rmiSet(String name,
Object to)
Sets the value of the parameter of the given name to the specified value. |
Serializable |
rmiTooStatus(String id)
Returns a short description of the status of the GRB targets. |
void |
run()
The run method of the master mind. |
private boolean |
runOneSequence(TargetDefinition aux)
Runs a single sequence on a target. |
private boolean |
runOneTarget(TargetDefinition sub)
Runs a single target. |
void |
setOff(String id)
Called if an ToO run out of its lifetime. |
protected void |
startMaster()
Starts this master mind in an individual thread. |
private static String |
statusProvider(StatusProviding stat)
Provides a generic status string for StatusProviding objects by
returning thei class name folowed by the string representation of their
status. |
boolean |
triggerGrb(String id,
double ra,
double de,
double exptime,
boolean interrupt)
Passes to triggerToo(java.lang.String, java.lang.String, double, double, double, boolean) with the special grb template
GRBTEMPLATE. |
boolean |
triggerToo(String id,
String templ,
double ra,
double de,
double exptime,
boolean interrupt)
This method expects the template to point to the serialized version of a parsed target. |
boolean |
updateToo(String id,
String field,
Object to)
This method grabs the ToO from the internal list via the supplied id, checks, if the target has a specific field as specified in the second argument, and, if so, tries to update it. |
| Methods inherited from class stella.CastingContainer |
|---|
addErrorListener, addRmiErrorListener, isValid, notifyErrorListener, removeErrorListener, removeRmiErrorListener, sendError, sendError, sendError, sendStatus, sendStatus, sendStatus |
| Methods inherited from class util.rmi.AbstractRmiCaster |
|---|
bindAlternate, bindToRegistry, bindToRegistry, bindToRegistry, casterExit, casterExit, getBindName, getBindName, unbindFromRegistry, unbindFromRegistry |
| Methods inherited from class util.rmi.RmiPropertyContainer |
|---|
containsRemoteProperty, getRemoteProperties, getRemoteProperty, setRemoteProperty |
| 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, rescanned, setObject, setProperties, setProperty, stringProperties, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface stella.rmi.RmiErrorCaster |
|---|
addRmiErrorListener, removeRmiErrorListener |
| Methods inherited from interface util.rmi.RmiCaster |
|---|
bindToRegistry, isValid, unbindFromRegistry |
| Methods inherited from interface util.ResourceSupplying |
|---|
getResource, getResourceAsStream, getResources |
| 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 |
| Field Detail |
|---|
public static final Object LOCK
public static final String GRBTEMPLATE
public static final String KEY_RENDER
public static final String KEY_RECEIVER
public static final String KEY_SEQUENCER
public static final String KEY_SCHEDULER
public static final String KEY_ERROR
public static final String KEY_GLOBAL
public static final String KEY_TARGETLIST
public static final String KEY_UNIQUE
public static final String KEY_SIMULATE
public static final String KEY_RUNTIME
public static final String KEY_RANKMONITOR
public static final String KEY_LOGGER
public static final String KEY_SERVER
public static final String KEY_LOCALWEATHER
public static final String KEY_THREADNAME
public static final String KEY_LOGGERGROUP
public static final String KEY_TIME
public static final String KEY_TWILIGHT
public static final String KEY_TOO
public static final String KEY_TOOALIVE
public static final String KEY_URL
public static final String KEY_INITDELAY
public static final String KEY_COOLDOWN
public static final String KEY_SLEEP
public static final String KEY_TIMEOUT
public static final String KEY_CANCELTIME
public static final String KEY_CLEANONEXIT
public static final String KEY_BIND
public static final String KEY_STELLA
private static final String DEFLOGGERGROUP
private static final String DEFTIME
private static final String DEFTWILIGHT
private static final String DEFTOO
private static final long DEFTOOALIVE
private static final String DEFURL
private static final long DEFINITDELAY
private static final long DEFCOOLDOWN
private static final long DEFSLEEP
private static final long DEFTIMEOUT
private static final long DEFCANCELTIME
private static final String DEFUNIQUE
private static final boolean DEFSIMULATE
private static final long DEFRUNTIME
private static final boolean DEFCLEANONEXIT
private static final boolean DEFBIND
RemoteParameter.
private static final String DEFBINDNAME
private static final String DEFSTELLA
private CommandRendering render
private CommandLaunching[] servers
KEY_RECEIVER list.
private Scheduling scheduler
private Sequencing sequencer
private ErrorHandling errorhandler
private ParameterClustering parameters
private TargetProviding<TargetDefinition> targetlist
private RankingMonitor rank
private Map<TargetDefinition,MasterMind.Stamp> timetable
private Map<String,ParsedTarget> grb
private ParameterServer globalserver
private Logging[] loggers
private WeatherSurveying weather
private Timer devicetimer
private boolean cancel
private static MasterMind mastermind
private static Thread masterthread
private static ThreadGroup loggergroup
private static boolean idle
private static final int CLEANSEPRIORITY
ExitCleaning on this should occur.
private static final int SEQUENCERPRIORITY
ExitCleaning on sequencer should occur.
private static final int HANDLERPRIORITY
ExitCleaning on error handler should occur.
private static final int LAUNCHERPRIORITY
ExitCleaning on command handlers occur.
private static final int MASTERPRIORITY
ExitCleaning on error handler should occur.
| Constructor Detail |
|---|
public MasterMind(Map<String,String> prop)
throws RemoteException
initRequired() and
initOptional() before startMaster().
RemoteException| Method Detail |
|---|
public void init()
startMaster().
init in interface Initializableinit in class PropertyResourcesprotected void initRequired()
KEY_RECEIVER mapping into a vector of devices
properties files. Each property file is than used to construct a new
CommandLaunching instance via a call to
AbstractCommandLauncher.createCommandLauncher(java.util.Map). All command
launcher are than comprised into an array.KEY_RENDER mapping into a Map object
and passes it to the static method
AbstractCommandRenderer.createCommandRenderer(java.util.Map). This method
creates a new command rendering instance.KEY_GLOBAL mapping into a Map object
and passes it to the static method
AbstractParameterCluster.createParameterCluster(java.util.Map). This method
creates a new parameter clustering instance.KEY_ERROR mapping into a Map object
and passes it to the static method
AbstractErrorHandler.createErrorHandler(java.util.Map). This method creates a
new error handling instance.KEY_SEQUENCER mapping into a Map
object and passes it to the static method
AbstractSequencer.createSequencer(java.util.Map) . This method creates a new
sequencer instance.KEY_SCHEDULER mapping into a Map
object and passes it to the static method
AbstractScheduler.createScheduler(java.util.Map) . This method creates a new
scheduler instance.MasterInitException
is thrown. After initializing is complete, the master mind is started via
a call to startMaster().
MasterInitException - If construction of either object fails.protected void initOptional()
KEY_LOGGER mapping into a vector of logger
properties files if present. Each property file is than used to construct
a new Logging via a call to
AbstractLogger.createLogger(java.util.Map). All existing casters, i.e. the
command servers, the weather watcher, it's sensors and the scheduler and
sequencer are than registered at the loggers with a call to
Logging.registerCaster(stella.Caster). Each logger is responsible to register
itself to the appropriate caster if it wants to use the events it
generates. After the registration process, the loggers are started within
a demon thread-group loggergroup.
public void exit()
exit in interface ExitCleaningexit in class CastingContainer
public Set rmiGetAllParameterNames()
throws RemoteException
#getAllParameterNames
rmiGetAllParameterNames in interface RmiParameterClusteringRemoteException
public Object rmiGet(String name)
throws RemoteException
#get.
rmiGet in interface RmiParameterClusteringRemoteException
public Object rmiSet(String name,
Object to)
throws RemoteException
rmiSet in interface RmiParameterClusteringRemoteException
public void rmiAddParameter(URL resource)
throws RemoteException
rmiAddParameter in interface RmiParameterClusteringRemoteException
public void rmiRemoveParameter(String name)
throws RemoteException
rmiRemoveParameter in interface RmiParameterClusteringRemoteException
public String getTelescope()
throws RemoteException
getTelescope in interface SchedulerControllingRemoteException
public boolean addTarget(TargetDefinition dom)
throws RemoteException
addTarget in interface SchedulerControllingRemoteException
public boolean removeTarget(String name)
throws RemoteException
removeTarget in interface SchedulerControllingRemoteException
public void removeAllTargets()
throws RemoteException
removeAllTargets in interface SchedulerControllingRemoteException
public boolean reloadTargets()
throws RemoteException
reloadTargets in interface SchedulerControllingRemoteException
public boolean addMeritLog(String newtd)
throws RemoteException
addMeritLog in interface SchedulerLoggingRemoteException
public boolean removeMeritLog(String newtd)
throws RemoteException
addTarget(stella.TargetDefinition) method.
removeMeritLog in interface SchedulerLoggingRemoteExceptionpublic long getRefreshInterval()
getRefreshInterval in interface Refreshingpublic boolean isFixedRate()
isFixedRate in interface RefreshingTimerpublic void refresh()
refresh in interface Refreshing
public List<String> listAllTargets()
throws RemoteException
listAllTargets in interface SchedulerControllingRemoteException
public Collection<TargetDefinition> getAllTargets()
throws RemoteException
getAllTargets in interface SchedulerControllingRemoteException
public TargetDefinition getTarget(String name)
throws RemoteException
getTarget in interface SchedulerControllingRemoteException
public Object rmiProvideStatus()
throws RemoteException
rmiProvideStatus in interface RmiStatusProvidingRemoteExceptionpublic Object provideStatus()
public boolean triggerGrb(String id,
double ra,
double de,
double exptime,
boolean interrupt)
throws RemoteException
triggerToo(java.lang.String, java.lang.String, double, double, double, boolean) with the special grb template
GRBTEMPLATE.
triggerGrb in interface TargetOfOpportunityid - A unique identifier for the GRB, can be a count number.ra - The right ascension of the GRB, degrees, J2000.0de - The declination of the GRB, degrees, J2000.0.exptime - The initial exposure time in seconds.interrupt - If true, ongoing observation should be canceled.
RemoteException
public boolean triggerToo(String id,
String templ,
double ra,
double de,
double exptime,
boolean interrupt)
throws RemoteException
updateToo(java.lang.String, java.lang.String, java.lang.Object). This method also updates the
scheduler. Currently, the interrupt flag is ignored, but in future
version, an exception could be generated as the final step, triggering
the scheduler to get the next highest target, which is then the GRB.
triggerToo in interface TargetOfOpportunityid - A unique identifier for the GRB, can be a count number.templ - A resource description that describes the ToO to use.ra - The right ascension of the GRB, degrees, J2000.0de - The declination of the GRB, degrees, J2000.0.exptime - The initial exposure time in seconds.interrupt - If true, ongoing observation should be canceled.
RemoteExceptionpublic void setOff(String id)
setOff in interface AlarmHandler
public boolean updateToo(String id,
String field,
Object to)
throws RemoteException
ParsedTarget.getSetups() and scans through all
the constants in all setups for a constant of the given field name. If a
constant is found, it is updated to the supplied object. If everything is
successful, the target is reloaded into the scheduler.
updateToo in interface TargetOfOpportunityid - The id used on creation of the GRB.field - The name of the field to be updated.to - The new value of the field, possible a Number or String.
RemoteException
public boolean removeToo(String name)
throws RemoteException
addTarget(stella.TargetDefinition) method.
removeToo in interface TargetOfOpportunityRemoteException
public Collection<String> getActive()
throws RemoteException
getActive in interface TargetOfOpportunityRemoteException
public Serializable rmiTooStatus(String id)
throws RemoteException
rmiTooStatus in interface TargetOfOpportunityRemoteExceptionprivate static String statusProvider(StatusProviding stat)
StatusProviding objects by
returning thei class name folowed by the string representation of their
status.
protected void startMaster()
public void run()
run in interface Runnablepublic void cancel()
cancel in interface CancelRunnablepublic static boolean isIdle()
public static boolean nighttime()
public Thread getAsociatedThread()
getAsociatedThread in interface CancelRunnablepublic long maxTimeToCancel()
maxTimeToCancel in interface CancelRunnableprivate boolean runOneTarget(TargetDefinition sub)
runOneSequence(stella.TargetDefinition) starts. Returns only if the target has no
unfinished Successor and no parent.
private boolean runOneSequence(TargetDefinition aux)
aux - The target to run the sequence on.
private Unique getUnique()
private long getTime()
private String formatTime()
private void advanceTime(long sleep)
SettableTime object.
Otherwise we sleep for the anticipated period.
private static double getFreeMemory()
public static void main(String[] arg)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||