|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ListenerControlling
This interface defines the remote capabilities of registering and deregister from a caster. It is intended to allow in-situ shifting from one caster to another without restarting the program. This is useful for e.g. shifting the building control from the automatic (SCS) mode to a manual (JLAunchBox) mode. The methods provided are:
#registerAt: Registers at the command-caster with the given
name.
The caster must be a remote reference to a RmiCommandCaster as well
as a RmiAcknowledgeListener and a RmiDoneListener.
Additionally,
we grab the caster and register it as an acknowledge and done listener
to our casting capabilities.#deregisterAt: Deregisters at the caster with the given name.
The caster must be a remote reference to a RmiCommandCaster as well
as a RmiAcknowledgeListener and a RmiDoneListener.
Additionally,
we remove it from our acknowledge and done listener list.external(java.rmi.Remote) If issued with true, we switch to external mode.
Only in this mode, a single external caster is allowed to register at this
object. If issued with false, we deregister from any external caster.
automatic(): Only if automatic mode is enabled, we accept
commands from a default command caster. No further rmi-methods, like
BuildingControl#openRoof are allowed, except the {link #manual}
command. If we switch to automatic mode, we register at the default
command caster, if specified. If an external caster was specified, it
is deregistered.manual(): Only in manual mode, further rmi-methods are accepted.
If we switch to manual mode, we deregister from any default or
external caster.EnvironmentMaster to accept
commands from an alternate caster? First, we issue a external(java.rmi.Remote) to
the master. Any default caster is deregistered, if we are in automatic mode.
Then, we call #registerAt with the new external caster. A reference
to this caster is kept locally. When we want to stop interference from
the external caster we call external with false, which changes
the state of the master to the state it was prior to the first call to
external(java.rmi.Remote). If we have an externla caster active and then call
either automatic() or manual(), the external caster is
deregistered and the master attains the desired state.
| Method Summary | |
|---|---|
boolean |
automatic()
Goes to automatic mode. |
boolean |
external(Remote caster)
Allows or prohibits excess from an external caster. |
String |
getStatus()
Returns a status decription of the master. |
boolean |
initialize()
(Re)initializes a master listener. |
boolean |
manual()
Goes to manual mode. |
boolean |
park()
Parks the master listener by simply calling GenericMaster.parkMaster(). |
void |
quit()
Parks the master listener by simply calling GenericMaster.quitMaster(). |
boolean |
reset()
Resets the master listener. |
boolean |
setPassive(boolean passive)
Sets the listener in passive mode. |
| Method Detail |
|---|
boolean automatic()
throws RemoteException
manual() method.
RemoteException
boolean manual()
throws RemoteException
RemoteException
boolean setPassive(boolean passive)
throws RemoteException
RemoteException
boolean external(Remote caster)
throws RemoteException
RemoteException
String getStatus()
throws RemoteException
RemoteException
boolean initialize()
throws RemoteException
GenericMaster.initializeMaster().
RemoteException
boolean reset()
throws RemoteException
GenericMaster.resetMaster().
RemoteException
boolean park()
throws RemoteException
GenericMaster.parkMaster().
RemoteException
void quit()
throws RemoteException
GenericMaster.quitMaster().
RemoteException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||