visad.collab
Class RemoteDisplayMonitorImpl
- java.lang.Object
-
- java.rmi.server.RemoteObject
-
- java.rmi.server.RemoteServer
-
- java.rmi.server.UnicastRemoteObject
-
- visad.collab.RemoteDisplayMonitorImpl
-
- All Implemented Interfaces:
- java.io.Serializable, java.rmi.Remote, java.util.EventListener, DisplayMonitor, RemoteDisplayMonitor, ControlListener, DisplayListener, MessageListener, ScalarMapListener
public class RemoteDisplayMonitorImpl extends java.rmi.server.UnicastRemoteObject implements RemoteDisplayMonitor
RemoteDisplayMonitorImplis the implementation of the VisADRemoteDisplayMonitorclass.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface visad.collab.DisplayMonitor
UNKNOWN_LISTENER_ID
-
-
Constructor Summary
Constructors Constructor and Description RemoteDisplayMonitorImpl(DisplayMonitorImpl dpyMonitor)Creates a remotely-accessible wrapper for the specifiedDisplayMonitor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddListener(MonitorCallback l, int id)Adds this listener to the remoteDisplayMonitor.voidaddListener(RemoteDisplay rd, int id)Adds this remote display to the remoteDisplayMonitor.voidaddRemoteListener(RemoteDisplay rd)Unusable stub.intcheckID(int id)Asks remoteDisplayMonitorto check this ID for uniqueness.voidcontrolChanged(ControlEvent e)Forwards the event to the adapted remoteDisplayMonitor.voidcontrolChanged(ScalarMapControlEvent e)Forwards the event to the adapted remoteDisplayMonitor.voiddestroy()destroy this monitorvoiddisplayChanged(DisplayEvent e)Forwards the event to the adapted remoteDisplayMonitor.intgetConnectionID(RemoteDisplay rmtDpy)Return the ID associated with the specified RemoteDisplay.booleanhasEventQueued(Control ctl)Unusable stub.booleanhasEventQueued(int originator, Control ctl)Unusable stub.booleanisEmpty()voidmapChanged(ScalarMapEvent e)Forwards the event to the adapted remoteDisplayMonitor.voidnotifyListeners(MonitorEvent evt)Forwards the event to the remoteDisplayMonitor.voidreceiveMessage(MessageEvent msg)Handles MessageEvent forwarding.voidsetDisplaySync(DisplaySync sync)Set the display synchronization object for this displayjava.lang.StringtoString()Returns a string representation of this object.
-
-
-
Constructor Detail
-
RemoteDisplayMonitorImpl
public RemoteDisplayMonitorImpl(DisplayMonitorImpl dpyMonitor) throws java.rmi.RemoteException
Creates a remotely-accessible wrapper for the specifiedDisplayMonitor- Parameters:
dpyMonitor- The local DisplayMonitor object to adapt.- Throws:
java.rmi.RemoteException- If there was an RMI-related problem.
-
-
Method Detail
-
displayChanged
public void displayChanged(DisplayEvent e) throws java.rmi.RemoteException, RemoteVisADException
Forwards the event to the adapted remoteDisplayMonitor.- Specified by:
displayChangedin interfaceDisplayListener- Parameters:
e- TheDisplayEventto forward.- Throws:
java.rmi.RemoteException- If there was an RMI-related problem.RemoteVisADException- If there was an internal problem.
-
mapChanged
public void mapChanged(ScalarMapEvent e)
Forwards the event to the adapted remoteDisplayMonitor.- Specified by:
mapChangedin interfaceScalarMapListener- Parameters:
e- TheScalarMapEventto forward.
-
controlChanged
public void controlChanged(ScalarMapControlEvent e)
Forwards the event to the adapted remoteDisplayMonitor.- Specified by:
controlChangedin interfaceScalarMapListener- Parameters:
e- TheScalarMapEventto forward.
-
controlChanged
public void controlChanged(ControlEvent e) throws RemoteVisADException
Forwards the event to the adapted remoteDisplayMonitor.- Specified by:
controlChangedin interfaceControlListener- Parameters:
e- ControlEvent to forward- Throws:
RemoteVisADException- If there was an internal problem.
-
checkID
public int checkID(int id) throws java.rmi.RemoteExceptionAsks remoteDisplayMonitorto check this ID for uniqueness.- Specified by:
checkIDin interfaceDisplayMonitor- Parameters:
id- The identifier to check for uniqueness.- Throws:
java.rmi.RemoteException- If there was an RMI-related problem.
-
destroy
public void destroy() throws RemoteVisADExceptiondestroy this monitor- Specified by:
destroyin interfaceDisplayMonitor- Throws:
RemoteVisADException
-
addListener
public void addListener(MonitorCallback l, int id) throws java.rmi.RemoteException, RemoteVisADException
Adds this listener to the remoteDisplayMonitor.- Specified by:
addListenerin interfaceDisplayMonitor- Parameters:
l- The listener to addid- The unique identifer (determined with checkID.)- Throws:
java.rmi.RemoteException- If there was an RMI-related problem.RemoteVisADException- If there was an internal problem.
-
addListener
public void addListener(RemoteDisplay rd, int id) throws java.rmi.RemoteException, RemoteVisADException
Adds this remote display to the remoteDisplayMonitor.- Specified by:
addListenerin interfaceDisplayMonitor- Parameters:
rd- The remote display to addid- The unique identifer (determined with checkID.)- Throws:
java.rmi.RemoteException- If there was an RMI-related problem.RemoteVisADException- If there was an internal problem.
-
addRemoteListener
public void addRemoteListener(RemoteDisplay rd) throws java.rmi.RemoteException, RemoteVisADException
Unusable stub. Cannot connect two RemoteDisplayMonitors.- Specified by:
addRemoteListenerin interfaceDisplayMonitor- Parameters:
rd- Ignored.- Throws:
java.rmi.RemoteException- If there was an RMI-related problem.RemoteVisADException- ALWAYS thrown.
-
getConnectionID
public int getConnectionID(RemoteDisplay rmtDpy) throws java.rmi.RemoteException
Return the ID associated with the specified RemoteDisplay.- Specified by:
getConnectionIDin interfaceDisplayMonitor- Returns:
- UNKNOWN_LISTENER_ID if not found; otherwise, returns the ID.
- Throws:
java.rmi.RemoteException
-
notifyListeners
public void notifyListeners(MonitorEvent evt) throws RemoteVisADException
Forwards the event to the remoteDisplayMonitor.- Specified by:
notifyListenersin interfaceDisplayMonitor- Parameters:
evt- The event to forward.- Throws:
RemoteVisADException- If there was an internal problem.
-
hasEventQueued
public boolean hasEventQueued(int originator, Control ctl) throws java.rmi.RemoteExceptionUnusable stub. Unimplemented.- Specified by:
hasEventQueuedin interfaceDisplayMonitor- Parameters:
originator- Ignored.ctl- Ignored.- Throws:
java.rmi.RemoteException- ALWAYS thrown.
-
isEmpty
public boolean isEmpty() throws java.rmi.RemoteException- Specified by:
isEmptyin interfaceDisplayMonitor- Throws:
java.rmi.RemoteException
-
hasEventQueued
public boolean hasEventQueued(Control ctl) throws java.rmi.RemoteException
Unusable stub. Unimplemented.- Specified by:
hasEventQueuedin interfaceDisplayMonitor- Parameters:
ctl- Ignored.- Throws:
java.rmi.RemoteException- ALWAYS thrown.
-
receiveMessage
public void receiveMessage(MessageEvent msg) throws java.rmi.RemoteException
Handles MessageEvent forwarding.- Specified by:
receiveMessagein interfaceMessageListener- Parameters:
msg- The message to forward.- Throws:
java.rmi.RemoteException
-
setDisplaySync
public void setDisplaySync(DisplaySync sync) throws java.rmi.RemoteException
Set the display synchronization object for this display- Specified by:
setDisplaySyncin interfaceDisplayMonitor- Throws:
java.rmi.RemoteException
-
toString
public java.lang.String toString()
Returns a string representation of this object.- Overrides:
toStringin classjava.rmi.server.RemoteObject
-
-
DMelt 3.0 © DataMelt by jWork.ORG