visad.collab
Interface DisplayMonitor
-
- All Superinterfaces:
- ControlListener, DisplayListener, java.util.EventListener, MessageListener, ScalarMapListener, java.io.Serializable
- All Known Subinterfaces:
- RemoteDisplayMonitor
- All Known Implementing Classes:
- DisplayMonitorImpl, RemoteDisplayMonitorImpl
public interface DisplayMonitor extends ControlListener, DisplayListener, MessageListener, ScalarMapListener, java.io.Serializable
DisplayMonitoris the interface for objects which monitor the state ofControls,Displays andScalarMaps.
-
-
Field Summary
Fields Modifier and Type Field and Description static intUNKNOWN_LISTENER_IDConnection ID used to indicate errors
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidaddListener(MonitorCallback callback, int id)Adds the specified listener to receiveMonitorEvents when the monitoredDisplay's state changes.voidaddListener(RemoteDisplay rd, int id)Adds the specified remote display to receiveMonitorEvents when the monitoredDisplay's state changes.voidaddRemoteListener(RemoteDisplay rd)Initializes links so thatMonitorEvents will be exchanged with the specified remoteDisplay.intcheckID(int id)Returns a suggestion for a unique listener identifier which is equal to or greater than the supplied ID.voiddestroy()destroy this monitorintgetConnectionID(RemoteDisplay rmtDpy)Return the ID associated with the specified RemoteDisplay.booleanhasEventQueued(Control ctl)Returnstrueif there is aMonitorEventfor the specifiedControlwaiting to be delivered to any listener.booleanhasEventQueued(int listenerID, Control ctl)Returnstrueif there is aMonitorEventfor the specifiedControlwaiting to be delivered to the listener with the specified id.booleanisEmpty()voidnotifyListeners(MonitorEvent evt)Forwards theMonitorEventto all the listeners associated with thisDisplayMonitor.voidsetDisplaySync(DisplaySync sync)Set the display synchronization object for this display-
Methods inherited from interface visad.ControlListener
controlChanged
-
Methods inherited from interface visad.DisplayListener
displayChanged
-
Methods inherited from interface visad.MessageListener
receiveMessage
-
Methods inherited from interface visad.ScalarMapListener
controlChanged, mapChanged
-
-
-
-
Field Detail
-
UNKNOWN_LISTENER_ID
static final int UNKNOWN_LISTENER_ID
Connection ID used to indicate errors- See Also:
- Constant Field Values
-
-
Method Detail
-
addListener
void addListener(MonitorCallback callback, int id) throws java.rmi.RemoteException, VisADException
Adds the specified listener to receiveMonitorEvents when the monitoredDisplay's state changes.- Parameters:
callback- The object to which events are delivered.id- The unique identifier.- Throws:
java.rmi.RemoteException- If there was an RMI-related problem.VisADException- If the listenerVectoris uninitialized.
-
addListener
void addListener(RemoteDisplay rd, int id) throws java.rmi.RemoteException, VisADException
Adds the specified remote display to receiveMonitorEvents when the monitoredDisplay's state changes.- Parameters:
rd- The remote display to add.id- The unique listener identifier.- Throws:
java.rmi.RemoteException- If there was an RMI-related problem.VisADException- If the listenerVectoris uninitialized.
-
addRemoteListener
void addRemoteListener(RemoteDisplay rd) throws java.rmi.RemoteException, RemoteVisADException
Initializes links so thatMonitorEvents will be exchanged with the specified remoteDisplay.- Parameters:
rd- The remoteDisplayto synchronize.- Throws:
java.rmi.RemoteException- If there was an RMI-related problem.RemoteVisADException- If the inter-Displaylinks could not be made.
-
checkID
int checkID(int id) throws java.rmi.RemoteExceptionReturns a suggestion for a unique listener identifier which is equal to or greater than the supplied ID.- Parameters:
id- The identifier to check.- Throws:
java.rmi.RemoteException- If there was an RMI-related problem.
-
destroy
void destroy() throws java.rmi.RemoteException, RemoteVisADExceptiondestroy this monitor- Throws:
java.rmi.RemoteExceptionRemoteVisADException
-
getConnectionID
int getConnectionID(RemoteDisplay rmtDpy) throws java.rmi.RemoteException
Return the ID associated with the specified RemoteDisplay.- Returns:
- UNKNOWN_LISTENER_ID if not found; otherwise, returns the ID.
- Throws:
java.rmi.RemoteException
-
hasEventQueued
boolean hasEventQueued(Control ctl) throws java.rmi.RemoteException
Returnstrueif there is aMonitorEventfor the specifiedControlwaiting to be delivered to any listener.- Parameters:
ctl- TheControlbeing found.- Throws:
java.rmi.RemoteException- If there was an RMI-related problem.
-
hasEventQueued
boolean hasEventQueued(int listenerID, Control ctl) throws java.rmi.RemoteExceptionReturnstrueif there is aMonitorEventfor the specifiedControlwaiting to be delivered to the listener with the specified id.- Parameters:
listenerID- The identifier for the listener.ctl- TheControlbeing found.- Throws:
java.rmi.RemoteException- If there was an RMI-related problem.
-
isEmpty
boolean isEmpty() throws java.rmi.RemoteException- Throws:
java.rmi.RemoteException
-
notifyListeners
void notifyListeners(MonitorEvent evt) throws java.rmi.RemoteException, RemoteVisADException
Forwards theMonitorEventto all the listeners associated with thisDisplayMonitor.- Parameters:
evt- The event to forward.- Throws:
java.rmi.RemoteException- If there was an RMI-related problem.RemoteVisADException- If there is an internal error.
-
setDisplaySync
void setDisplaySync(DisplaySync sync) throws java.rmi.RemoteException
Set the display synchronization object for this display- Throws:
java.rmi.RemoteException
-
-
DMelt 3.0 © DataMelt by jWork.ORG