visad
Class SocketSlaveDisplay
- java.lang.Object
-
- visad.SocketSlaveDisplay
-
- All Implemented Interfaces:
- java.rmi.Remote, RemoteSlaveDisplay
public class SocketSlaveDisplay extends java.lang.Object implements RemoteSlaveDisplay
A SocketSlaveDisplay server wraps around a VisAD display, providing support for stand-alone remote displays (i.e., not dependent on the VisAD packages) that communicate with the server using sockets. For an example, see examples/Test68.java together with the stand-alone VisAD applet visad.browser.VisADApplet, usable from within a web browser.
-
-
Constructor Summary
Constructors Constructor and Description SocketSlaveDisplay(DisplayImpl d)construct a SocketSlaveDisplay for the given VisAD displaySocketSlaveDisplay(DisplayImpl d, int port)construct a SocketSlaveDisplay for the given VisAD display, and communicate with clients using the given port
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intgetPort()get the socket port used by this SocketSlaveDisplayvoidkillServer()destroy this server and kills all associated threadsvoidsendImage(int[] pixels, int width, int height, int type)display automatically calls sendImage when its content changesvoidsendMessage(java.lang.String message)send the given message to this slave display
-
-
-
Constructor Detail
-
SocketSlaveDisplay
public SocketSlaveDisplay(DisplayImpl d) throws java.io.IOException
construct a SocketSlaveDisplay for the given VisAD display- Throws:
java.io.IOException
-
SocketSlaveDisplay
public SocketSlaveDisplay(DisplayImpl d, int port) throws java.io.IOException
construct a SocketSlaveDisplay for the given VisAD display, and communicate with clients using the given port- Throws:
java.io.IOException
-
-
Method Detail
-
getPort
public int getPort()
get the socket port used by this SocketSlaveDisplay
-
sendImage
public void sendImage(int[] pixels, int width, int height, int type) throws java.rmi.RemoteExceptiondisplay automatically calls sendImage when its content changes- Specified by:
sendImagein interfaceRemoteSlaveDisplay- Throws:
java.rmi.RemoteException
-
sendMessage
public void sendMessage(java.lang.String message) throws java.rmi.RemoteExceptionsend the given message to this slave display- Specified by:
sendMessagein interfaceRemoteSlaveDisplay- Throws:
java.rmi.RemoteException
-
killServer
public void killServer()
destroy this server and kills all associated threads
-
-
DMelt 3.0 © DataMelt by jWork.ORG