visad
Class RemoteDisplayImpl

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by java.rmi.server.RemoteServer
          extended by java.rmi.server.UnicastRemoteObject
              extended by visad.RemoteActionImpl
                  extended by visad.RemoteDisplayImpl
All Implemented Interfaces:
Serializable, Remote, EventListener, Action, Display, RemoteAction, RemoteDisplay, ThingChangedListener

public class RemoteDisplayImpl
extends RemoteActionImpl
implements RemoteDisplay

RemoteDisplayImpl is the VisAD class for remote access to Display-s.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Fields inherited from interface visad.Display
AdjustProjectionSeam, Alpha, Animation, Blue, CacheAppearances, CMY, ColorMode, components3c, components3s, componentscmy, componentscyl, componentsflow1, componentsflow1s, componentsflow2, componentsflow2s, componentshsv, componentsrgb, componentsso, CurvedSize, Cyan, CylAzimuth, CylRadius, CylZAxis, DisplayCMYCoordSys, DisplayCMYTuple, DisplayCylindricalCoordSys, DisplayFlow1SphericalCoordSys, DisplayFlow1SphericalTuple, DisplayFlow1Tuple, DisplayFlow2SphericalCoordSys, DisplayFlow2SphericalTuple, DisplayFlow2Tuple, DisplayHSVCoordSys, DisplayHSVTuple, DisplayRealArray, DisplayRGBTuple, DisplaySpatialCartesianTuple, DisplaySpatialCylindricalTuple, DisplaySpatialOffsetTuple, DisplaySpatialSphericalTuple, DisplaySphericalCoordSys, Flow1Azimuth, Flow1Elevation, Flow1Radial, Flow1X, Flow1Y, Flow1Z, Flow2Azimuth, Flow2Elevation, Flow2Radial, Flow2X, Flow2Y, Flow2Z, Green, HSV, Hue, IsoContour, Latitude, LineStyle, LineWidth, List, Longitude, Magenta, MergeGeometries, MissingTransparent, PointMode, PointSize, PolygonMode, PolygonOffset, PolygonOffsetFactor, Radius, Red, RGB, RGBA, Saturation, SelectRange, SelectValue, Shape, ShapeScale, Text, Texture3DMode, TextureEnable, Value, XAxis, XAxisOffset, YAxis, YAxisOffset, Yellow, ZAxis, ZAxisOffset
 
Constructor Summary
RemoteDisplayImpl(DisplayImpl d)
           
 
Method Summary
 void addMap(ScalarMap map)
          add a ScalarMap to this Display
 void addReference(DataReference ref, ConstantMap[] constant_maps)
          link ref to this Display; must be RemoteDataReference; this method may only be invoked after all links to ScalarMaps have been made; the ConstantMap array applies only to rendering ref
 void addReference(ThingReference ref)
          link ref to this Display; this method may only be invoked after all links to ScalarMaps have been made
 void addReferences(DataRenderer renderer, DataReference ref)
          link ref to this Display using the non-default renderer; refs may be a mix of RemoteDataReference & DataReferenceImpl; cannot be called through RemoteDisplay interface, since renderer implements neither Remote nor Serializable; must be called locally; this method may only be invoked after all links to ScalarMaps have been made; this is a method of DisplayImpl and RemoteDisplayImpl rather than Display - see Section 6.1 of the Developer's Guide for more information
 void addReferences(DataRenderer renderer, DataReference[] refs)
          link refs to this Display using the non-default renderer; refs may be a mix of RemoteDataReference & DataReferenceImpl; cannot be called through RemoteDisplay interface, since renderer implements neither Remote nor Serializable; must be called locally; this method may only be invoked after all links to ScalarMaps have been made; this is a method of DisplayImpl and RemoteDisplayImpl rather than Display - see Section 6.1 of the Developer's Guide for more information
 void addReferences(DataRenderer renderer, DataReference[] refs, ConstantMap[][] constant_maps)
          link refs to this Display using the non-default renderer; refs may be a mix of RemoteDataReference & DataReferenceImpl; cannot be called through RemoteDisplay interface, since renderer implements neither Remote nor Serializable; must be called locally; this method may only be invoked after all links to ScalarMaps have been made; the maps[i] array applies only to rendering refs[i]; this is a method of DisplayImpl and RemoteDisplayImpl rather than Display - see Section 6.1 of the Developer's Guide for more information
 void addReferences(DataRenderer renderer, DataReference ref, ConstantMap[] constant_maps)
          link ref to this Display using the non-default renderer; refs may be a mix of RemoteDataReference & DataReferenceImpl; cannot be called through RemoteDisplay interface, since renderer implements neither Remote nor Serializable; must be called locally; this method may only be invoked after all links to ScalarMaps have been made; the maps array applies only to rendering ref; this is a method of DisplayImpl and RemoteDisplayImpl rather than Display - see Section 6.1 of the Developer's Guide for more information
 void addSlave(RemoteSlaveDisplay display)
          links a slave display to this display
 void clearMaps()
          clear set of ScalarMap-s associated with this display
 void destroy()
          destroy this display
 Vector getConstantMapVector()
           
 int getDisplayAPI()
           
 String getDisplayClassName()
           
 String getDisplayRendererClassName()
           
 DisplaySync getDisplaySync()
          Returns a remotely-usable wrapper for the associated Display's synchronization object.
 GraphicsModeControl getGraphicsModeControl()
           
 Vector getMapVector()
           
 Vector getReferenceLinks()
           
 RemoteDisplayMonitor getRemoteDisplayMonitor()
           
 RemoteDisplaySync getRemoteDisplaySync()
          Returns a remotely-usable wrapper for the associated Display's synchronization object.
 boolean hasSlaves()
          whether there are any slave displays linked to this display
 void removeAllSlaves()
          removes all links between slave displays and this display
 void removeMap(ScalarMap map)
          remove a ScalarMap from this Display
 void removeReference(ThingReference ref)
          remove link to a DataReference; because DataReference array input to adaptedAddReferences may be a mix of local and remote, we tolerate either here
 void removeSlave(RemoteSlaveDisplay display)
          removes a link between a slave display and this display
 void sendMessage(MessageEvent msg)
          Send a message to all MessageListeners.
 void sendMouseEvent(MouseEvent e)
          sends a mouse event to this remote display's associated display
 
Methods inherited from class visad.RemoteActionImpl
getName, removeAllReferences, thingChanged
 
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
 
Methods inherited from interface visad.RemoteDisplay
getName
 
Methods inherited from interface visad.Action
removeAllReferences
 
Methods inherited from interface visad.ThingChangedListener
thingChanged
 

Constructor Detail

RemoteDisplayImpl

public RemoteDisplayImpl(DisplayImpl d)
                  throws RemoteException
Throws:
RemoteException
Method Detail

addSlave

public void addSlave(RemoteSlaveDisplay display)
              throws VisADException,
                     RemoteException
links a slave display to this display

Specified by:
addSlave in interface Display
Parameters:
display - RemoteSlaveDisplay to link
Throws:
VisADException - a VisAD error occurred
RemoteException - an RMI error occurred

removeSlave

public void removeSlave(RemoteSlaveDisplay display)
                 throws VisADException,
                        RemoteException
removes a link between a slave display and this display

Specified by:
removeSlave in interface Display
Parameters:
display - RemoteSlaveDisplay to remove
Throws:
VisADException - a VisAD error occurred
RemoteException - an RMI error occurred

removeAllSlaves

public void removeAllSlaves()
                     throws VisADException,
                            RemoteException
removes all links between slave displays and this display

Specified by:
removeAllSlaves in interface Display
Throws:
VisADException - a VisAD error occurred
RemoteException - an RMI error occurred

hasSlaves

public boolean hasSlaves()
                  throws VisADException,
                         RemoteException
whether there are any slave displays linked to this display

Specified by:
hasSlaves in interface Display
Returns:
true if this display has any slave displays
Throws:
VisADException - a VisAD error occurred
RemoteException - an RMI error occurred

sendMouseEvent

public void sendMouseEvent(MouseEvent e)
                    throws VisADException,
                           RemoteException
sends a mouse event to this remote display's associated display

Specified by:
sendMouseEvent in interface RemoteDisplay
Throws:
VisADException
RemoteException

addReference

public void addReference(ThingReference ref)
                  throws VisADException,
                         RemoteException
link ref to this Display; this method may only be invoked after all links to ScalarMaps have been made

Specified by:
addReference in interface Action
Overrides:
addReference in class RemoteActionImpl
Parameters:
ref - The ThingReference to which to create the link. Subsequent invocation of thingChanged(ThingChangedEvent) causes invocation of ref.acknowledgeThingChanged(this) . This method invokes ref.addThingChangedListener(this, ...).
Throws:
RemoteVisADException - if the reference isn't a ThingReferenceImpl.
ReferenceException - if the reference has already been added.
VisADException - if a VisAD failure occurs.
RemoteException - if a Java RMI failure occurs.
See Also:
ThingChangedListener.thingChanged(ThingChangedEvent), ThingReference.addThingChangedListener(ThingChangedListener, long)

addReference

public void addReference(DataReference ref,
                         ConstantMap[] constant_maps)
                  throws VisADException,
                         RemoteException
link ref to this Display; must be RemoteDataReference; this method may only be invoked after all links to ScalarMaps have been made; the ConstantMap array applies only to rendering ref

Specified by:
addReference in interface Display
Parameters:
ref - DataReference to link to
constant_maps - array of ConstantMaps applied to linked Data
Throws:
VisADException - a VisAD error occurred
RemoteException - an RMI error occurred

addReferences

public void addReferences(DataRenderer renderer,
                          DataReference ref)
                   throws VisADException,
                          RemoteException
link ref to this Display using the non-default renderer; refs may be a mix of RemoteDataReference & DataReferenceImpl; cannot be called through RemoteDisplay interface, since renderer implements neither Remote nor Serializable; must be called locally; this method may only be invoked after all links to ScalarMaps have been made; this is a method of DisplayImpl and RemoteDisplayImpl rather than Display - see Section 6.1 of the Developer's Guide for more information

Throws:
VisADException
RemoteException

addReferences

public void addReferences(DataRenderer renderer,
                          DataReference ref,
                          ConstantMap[] constant_maps)
                   throws VisADException,
                          RemoteException
link ref to this Display using the non-default renderer; refs may be a mix of RemoteDataReference & DataReferenceImpl; cannot be called through RemoteDisplay interface, since renderer implements neither Remote nor Serializable; must be called locally; this method may only be invoked after all links to ScalarMaps have been made; the maps array applies only to rendering ref; this is a method of DisplayImpl and RemoteDisplayImpl rather than Display - see Section 6.1 of the Developer's Guide for more information

Specified by:
addReferences in interface Display
Parameters:
renderer - DataRenderer used to depict linked Data
ref - DataReference to link to
constant_maps - array of ConstantMaps applied to this Data
Throws:
VisADException - a VisAD error occurred
RemoteException - an RMI error occurred

addReferences

public void addReferences(DataRenderer renderer,
                          DataReference[] refs)
                   throws VisADException,
                          RemoteException
link refs to this Display using the non-default renderer; refs may be a mix of RemoteDataReference & DataReferenceImpl; cannot be called through RemoteDisplay interface, since renderer implements neither Remote nor Serializable; must be called locally; this method may only be invoked after all links to ScalarMaps have been made; this is a method of DisplayImpl and RemoteDisplayImpl rather than Display - see Section 6.1 of the Developer's Guide for more information

Throws:
VisADException
RemoteException

addReferences

public void addReferences(DataRenderer renderer,
                          DataReference[] refs,
                          ConstantMap[][] constant_maps)
                   throws VisADException,
                          RemoteException
link refs to this Display using the non-default renderer; refs may be a mix of RemoteDataReference & DataReferenceImpl; cannot be called through RemoteDisplay interface, since renderer implements neither Remote nor Serializable; must be called locally; this method may only be invoked after all links to ScalarMaps have been made; the maps[i] array applies only to rendering refs[i]; this is a method of DisplayImpl and RemoteDisplayImpl rather than Display - see Section 6.1 of the Developer's Guide for more information

Throws:
VisADException
RemoteException

removeReference

public void removeReference(ThingReference ref)
                     throws VisADException,
                            RemoteException
remove link to a DataReference; because DataReference array input to adaptedAddReferences may be a mix of local and remote, we tolerate either here

Specified by:
removeReference in interface Action
Overrides:
removeReference in class RemoteActionImpl
Parameters:
ref - The reference to be removed.
Throws:
RemoteVisADException - if the reference isn't a ThingReferenceImpl.
ReferenceException - if the reference isn't a part of this instance.
VisADException - if a VisAD failure occurs.
RemoteException - if a Java RMI failure occurs.

addMap

public void addMap(ScalarMap map)
            throws VisADException,
                   RemoteException
add a ScalarMap to this Display

Specified by:
addMap in interface Display
Parameters:
map - ScalarMap to link
Throws:
VisADException - a VisAD error occurred
RemoteException - an RMI error occurred

removeMap

public void removeMap(ScalarMap map)
               throws VisADException,
                      RemoteException
remove a ScalarMap from this Display

Specified by:
removeMap in interface Display
Parameters:
map - ScalarMap to remove
Throws:
VisADException - a VisAD error occurred
RemoteException - an RMI error occurred

clearMaps

public void clearMaps()
               throws VisADException,
                      RemoteException
clear set of ScalarMap-s associated with this display

Specified by:
clearMaps in interface Display
Throws:
VisADException - a VisAD error occurred
RemoteException - an RMI error occurred

destroy

public void destroy()
             throws VisADException,
                    RemoteException
destroy this display

Specified by:
destroy in interface Display
Throws:
VisADException
RemoteException

getDisplayClassName

public String getDisplayClassName()
                           throws RemoteException
Specified by:
getDisplayClassName in interface RemoteDisplay
Throws:
RemoteException

getDisplayAPI

public int getDisplayAPI()
                  throws RemoteException,
                         VisADException
Specified by:
getDisplayAPI in interface RemoteDisplay
Throws:
RemoteException
VisADException

getDisplayRendererClassName

public String getDisplayRendererClassName()
                                   throws RemoteException
Specified by:
getDisplayRendererClassName in interface RemoteDisplay
Throws:
RemoteException

getMapVector

public Vector getMapVector()
                    throws VisADException,
                           RemoteException
Specified by:
getMapVector in interface RemoteDisplay
Throws:
VisADException
RemoteException

getConstantMapVector

public Vector getConstantMapVector()
                            throws VisADException,
                                   RemoteException
Specified by:
getConstantMapVector in interface Display
Specified by:
getConstantMapVector in interface RemoteDisplay
Returns:
Vector of linked ConstantMaps
Throws:
VisADException
RemoteException

getGraphicsModeControl

public GraphicsModeControl getGraphicsModeControl()
                                           throws VisADException,
                                                  RemoteException
Specified by:
getGraphicsModeControl in interface RemoteDisplay
Throws:
VisADException
RemoteException

getReferenceLinks

public Vector getReferenceLinks()
                         throws VisADException,
                                RemoteException
Specified by:
getReferenceLinks in interface RemoteDisplay
Throws:
VisADException
RemoteException

getRemoteDisplayMonitor

public RemoteDisplayMonitor getRemoteDisplayMonitor()
                                             throws RemoteException
Specified by:
getRemoteDisplayMonitor in interface RemoteDisplay
Throws:
RemoteException

getDisplaySync

public DisplaySync getDisplaySync()
                           throws RemoteException
Returns a remotely-usable wrapper for the associated Display's synchronization object.

Specified by:
getDisplaySync in interface RemoteDisplay
Throws:
RemoteException

getRemoteDisplaySync

public RemoteDisplaySync getRemoteDisplaySync()
                                       throws RemoteException
Returns a remotely-usable wrapper for the associated Display's synchronization object.

Specified by:
getRemoteDisplaySync in interface RemoteDisplay
Throws:
RemoteException

sendMessage

public void sendMessage(MessageEvent msg)
                 throws RemoteException
Send a message to all MessageListeners.

Specified by:
sendMessage in interface Display
Parameters:
msg - Message being sent.
Throws:
RemoteException - an RMI error occurred