stella.rmi
Interface SchedulerControlling

All Superinterfaces:
Remote, RmiStatusProviding
All Known Subinterfaces:
TargetOfOpportunity
All Known Implementing Classes:
DummyToO, MasterMind

public interface SchedulerControlling
extends RmiStatusProviding

This remote interface defines methods to allow remote access to a scheduler's target list. This interface is intended for human interaction to the scheduling process. Please note that the name of a target must be unique. It is the name of the target-definition file, stripped for the extension.
A brief summary of the methods provided follows:


Method Summary
 boolean addTarget(TargetDefinition newtd)
          Adds a single target.
 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.
 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.
 
Methods inherited from interface util.rmi.RmiStatusProviding
rmiProvideStatus
 

Method Detail

addTarget

boolean addTarget(TargetDefinition newtd)
                  throws RemoteException
Adds a single target. The argument is an already parsed target definition and must thus be serializable.

Returns:
True, if a target was added
Throws:
RemoteException

removeTarget

boolean removeTarget(String name)
                     throws RemoteException
Removes the target from the scheduler's list. The target is physically removed and cannot be restored except by re-adding it with the addTarget(stella.TargetDefinition) method.

Returns:
True, if a target was removed.
Throws:
RemoteException

removeAllTargets

void removeAllTargets()
                      throws RemoteException
Removes all targets from the scheduler's list. The targets are physically removed and cannot be restored except by re-adding them.

Throws:
RemoteException

reloadTargets

boolean reloadTargets()
                      throws RemoteException
Reloads targets to get to a pre-defined state.

Returns:
True, if a targets were restored.
Throws:
RemoteException

getTarget

TargetDefinition getTarget(String name)
                           throws RemoteException
Returns a single target specified by its name. As this target is passed via the RMI interface, it must be serializable.

Throws:
RemoteException

getAllTargets

Collection<TargetDefinition> getAllTargets()
                                           throws RemoteException
Returna a list of all targets accessible. This collection might be long, and will be passed over the network, so be careful. Note that we return a collection here because there is no natural ordering on target definitions, thus nobody will ever intend to do natural-ordered sorting. Depending on the implementation, this collection may in fact be a list, though. Normal java implementations of collections are lists.

Throws:
RemoteException

listAllTargets

List<String> listAllTargets()
                            throws RemoteException
List all target names available to this scheduler. This carries only the target's names and is thus not as demanding as 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.

Throws:
RemoteException

getTelescope

String getTelescope()
                    throws RemoteException
Returns the telescope id this scheduler refers to.

Throws:
RemoteException