public class DummyToO extends UnicastRemoteObject implements TargetOfOpportunity
TargetOfOportunity interface.
Simply returns required values and outputs info to stdout if called
on the necessary routines.| Modifier and Type | Field and Description |
|---|---|
(package private) Map<String,String[]> |
grb |
ref| Constructor and Description |
|---|
DummyToO() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addTarget(TargetDefinition newtd)
Adds a single target.
|
Collection<String> |
getActive()
Returns all active IDs.
|
Collection<TargetDefinition> |
getAllTargets()
Returna a list of all targets accessible.
|
TargetDefinition |
getTarget(String name)
Returns a single target specified by its name.
|
String |
getTelescope()
Returns the telescope id this scheduler refers to.
|
List<String> |
listAllTargets()
List all target names available to this scheduler.
|
static void |
main(String[] arg) |
boolean |
reloadTargets()
Reloads targets to get to a pre-defined state.
|
void |
removeAllTargets()
Removes all targets from the scheduler's list.
|
boolean |
removeTarget(String name)
Removes the target from the scheduler's list.
|
boolean |
removeToo(String name)
Removes the target from the scheduler's list.
|
Object |
rmiProvideStatus() |
Serializable |
rmiTooStatus(String id)
Returns a short description of the status of the GRB targets.
|
boolean |
triggerGrb(String id,
double ra,
double de,
double exptime,
boolean interrupt)
This method triggers a new GRB observation.
|
boolean |
triggerToo(String id,
String templ,
double ra,
double de,
double exptime,
boolean interrupt)
This method triggers a new GRB observation.
|
boolean |
updateToo(String id,
String field,
Object to)
If a GRB target of the stated ID has been created by a trigger, this
method can be used to change critical
GrbTarget fields from
their default values. |
clone, exportObject, exportObject, exportObject, unexportObjectgetClientHost, getLog, setLogpublic DummyToO()
throws RemoteException
RemoteExceptionpublic boolean triggerGrb(String id, double ra, double de, double exptime, boolean interrupt) throws RemoteException
TargetOfOpportunity
Server-side, a new GrbTarget out of a template is generated,
with the critical information (ra, de, exptime) filled in after
instantiation.
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.RemoteExceptionpublic boolean triggerToo(String id, String templ, double ra, double de, double exptime, boolean interrupt) throws RemoteException
TargetOfOpportunity
Server-side, a new GrbTarget out of a template is generated,
with the critical information (ra, de, exptime) filled in after
instantiation.
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 boolean updateToo(String id, String field, Object to) throws RemoteException
TargetOfOpportunityGrbTarget fields from
their default values. The caller has to ensure that the field and
the ID is valid.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.RemoteExceptionpublic boolean removeToo(String name) throws RemoteException
addTarget(target.TargetDefinition) method.removeToo in interface TargetOfOpportunityRemoteExceptionpublic Collection<String> getActive() throws RemoteException
getActive in interface TargetOfOpportunityRemoteExceptionpublic Serializable rmiTooStatus(String id) throws RemoteException
rmiTooStatus in interface TargetOfOpportunityRemoteExceptionpublic boolean addTarget(TargetDefinition newtd) throws RemoteException
addTarget in interface SchedulerControllingRemoteExceptionpublic boolean removeTarget(String name) throws RemoteException
addTarget(target.TargetDefinition) method.removeTarget in interface SchedulerControllingRemoteExceptionpublic void removeAllTargets()
throws RemoteException
removeAllTargets in interface SchedulerControllingRemoteExceptionpublic boolean reloadTargets()
throws RemoteException
reloadTargets in interface SchedulerControllingRemoteExceptionpublic TargetDefinition getTarget(String name) throws RemoteException
getTarget in interface SchedulerControllingRemoteExceptionpublic Collection<TargetDefinition> getAllTargets() throws RemoteException
getAllTargets in interface SchedulerControllingRemoteExceptionpublic List<String> listAllTargets() throws RemoteException
getAllTargets().
Note that this method must return a list, because Strings have a
natural ordering, thus it makes sense to return a list of strings rather
than a collection to allow callers of this method to do sorting.listAllTargets in interface SchedulerControllingRemoteExceptionpublic String getTelescope() throws RemoteException
getTelescope in interface SchedulerControllingRemoteExceptionpublic Object rmiProvideStatus() throws RemoteException
rmiProvideStatus in interface RmiStatusProvidingRemoteException