stella.rmi
Interface RmiCommandListener

All Superinterfaces:
EventListener, Remote, RmiEventListener, RmiListener
All Known Implementing Classes:
AdapterMaster, AdapterSimulator, AuxiliaryMaster, AuxiliarySimulator, CalibrationMaster, CalibrationSimulator, DeviceSimulator, DomeMaster, DomeSimulator, EnvironmentMaster, EnvironmentSimulator, GenericMaster, GenericMaster.Standalone, GenericSimulator, JAdapter, JEnvironment, JMasterFrame, JMessageListener, MessageListener, ReceiverTorso, SesMaster, SesSimulator, ShelterMaster, TargetChangeListener, TelescopeMaster, TelescopeSimulator, TestReceiver, WifsipMaster, WifsipSimulator

public interface RmiCommandListener
extends RmiEventListener

The listener interface for receiving command events. The class that is interested in receiving commands implements this interface, and the object that is created from that class registers itself to command events generating sources. Registering and deregistering uses the standard convention names, addCommandListener and removeCommandListener. When a command is fired the command of all registered command listeners is invoked.

Due to the necessity to test the connection between command clients and command servers this interface also defines the RmiListener.isConnected() method. For an rmi based client/server schema, this method should simply return true. Misfunctional connection is detected via remote exceptions thrown.

See Also:
Remote

Method Summary
 boolean accepts(CommandEvent ce)
          Returns true if this rmi-command listener can handle the stated command.
 void rmiCommand(CommandEvent ce)
          The method called by registered telescope command casters.
 
Methods inherited from interface util.rmi.RmiEventListener
getListenerName
 
Methods inherited from interface util.rmi.RmiListener
disconnect, isConnected
 

Method Detail

rmiCommand

void rmiCommand(CommandEvent ce)
                throws RemoteException
The method called by registered telescope command casters.

Throws:
RemoteException

accepts

boolean accepts(CommandEvent ce)
                throws RemoteException
Returns true if this rmi-command listener can handle the stated command. This may be used in a scanning routine to find out which bindings are present that support a certain command type. The perfect procedure to follow if multiple instances are found handling a specific command type is undetermined, though.

Throws:
RemoteException