|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
stella.parameter.SwitchRelay
public class SwitchRelay
Relay the parameter given at the first command line argument to the local registry.
| Field Summary | |
|---|---|
private String |
bind
|
private String |
naming
|
private RemoteSwitch |
relay
|
private List<RmiListener> |
stubs
A list of registered rmi listners. |
| Fields inherited from class java.rmi.server.RemoteObject |
|---|
ref |
| Fields inherited from interface stella.rmi.RemoteTrigger |
|---|
NAMING_EXTENSION |
| Constructor Summary | |
|---|---|
SwitchRelay(String rmi,
String local)
|
|
| Method Summary | |
|---|---|
void |
addRmiListener(RmiListener ear)
Adds a listener for notification on exit. |
boolean |
bindToRegistry()
Iniates binding of this caster to the registry. |
void |
disconnect(RmiCaster from)
Signals that the caster will get invalid. |
boolean |
isConnected()
A method for the caster to check connection. |
boolean |
isValid()
A handle for the listener to test if the reference to the caster it is listening to is still valid. |
static void |
main(String[] arg)
|
Object |
remoteGet()
The remote edge of this trigger. |
Boolean |
remoteGetTrigger()
Retrieves the trigger value as a boolean. |
boolean |
remoteIsTrue()
Retrieves the trigger value as a primitive boolean. |
Date |
remoteToggleTime()
Retrieves the trigger toggle time using RMI. |
void |
removeRmiListener(RmiListener ear)
Removes a listener. |
private boolean |
startRelay()
|
boolean |
switchOff()
The remote switching is diverted to the servers switchOn(long). |
boolean |
switchOn(long maxtime)
The remote switching is diverted to the servers switchOn(long). |
boolean |
unbindFromRegistry()
Unbinds the caster from the registry. |
| Methods inherited from class java.rmi.server.UnicastRemoteObject |
|---|
clone, exportObject, exportObject, exportObject, unexportObject |
| Methods inherited from class java.rmi.server.RemoteServer |
|---|
getClientHost, getLog, setLog |
| Methods inherited from class java.rmi.server.RemoteObject |
|---|
equals, getRef, hashCode, toString, toStub |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private RemoteSwitch relay
private String naming
private String bind
private List<RmiListener> stubs
| Constructor Detail |
|---|
public SwitchRelay(String rmi,
String local)
throws RemoteException
RemoteException| Method Detail |
|---|
private boolean startRelay()
throws RemoteException
RemoteException
public boolean bindToRegistry()
throws RemoteException
RmiCaster
bindToRegistry in interface RmiCasterRemoteException
public boolean unbindFromRegistry()
throws RemoteException
RmiCasterExitCleaning
unbindFromRegistry in interface RmiCasterRemoteException
public void addRmiListener(RmiListener ear)
throws RemoteException
addRmiListener in interface RemoteParameterRemoteException
public void removeRmiListener(RmiListener ear)
throws RemoteException
removeRmiListener in interface RemoteParameterRemoteException
public Object remoteGet()
throws RemoteException
remoteGet in interface RemoteParameterRemoteException
public Boolean remoteGetTrigger()
throws RemoteException
RemoteTrigger
remoteGetTrigger in interface RemoteTriggerRemoteException
public boolean remoteIsTrue()
throws RemoteException
RemoteTrigger
remoteIsTrue in interface RemoteTriggerRemoteException
public Date remoteToggleTime()
throws RemoteException
RemoteTrigger
remoteToggleTime in interface RemoteTriggerRemoteException
public boolean switchOn(long maxtime)
throws RemoteException
switchOn(long).
switchOn in interface RemoteSwitchmaxtime - The maximum illumination time, in ms. Zero for unlimitied.
RemoteException
public boolean switchOff()
throws RemoteException
switchOn(long).
switchOff in interface RemoteSwitchRemoteException
public boolean isValid()
throws RemoteException
RmiCaster
isValid in interface RmiCasterRemoteException
public boolean isConnected()
throws RemoteException
RmiListener
isConnected in interface RmiListenerRemoteException
public void disconnect(RmiCaster from)
throws RemoteException
RmiListener
disconnect in interface RmiListenerRemoteException
public static void main(String[] arg)
throws RemoteException
RemoteException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||