visad.data
Class SocketDataServer

java.lang.Object
  extended by visad.data.SocketDataServer

public class SocketDataServer
extends Object

A class for exporting data to a socket stream. Whenever the given DataReference's data changes, it is sent across the socket to any clients that are listening.


Field Summary
protected  boolean alive
          Whether the server is still active.
protected  Vector outs
          List of output streams for client sockets.
protected  int port
          The socket's port.
protected  DataReferenceImpl ref
          DataReference whose data is linked to the socket stream.
protected  ServerSocket socket
          The main socket for this SocketDataServer.
protected  Vector sockets
          List of client sockets listening to this SocketDataServer.
 
Constructor Summary
SocketDataServer(int port, DataReferenceImpl ref)
          Construct a SocketDataServer with the given port and data reference.
 
Method Summary
 void killServer()
          destroys this server and kills all associated threads
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

socket

protected ServerSocket socket
The main socket for this SocketDataServer.


sockets

protected Vector sockets
List of client sockets listening to this SocketDataServer.


outs

protected Vector outs
List of output streams for client sockets.


port

protected int port
The socket's port.


ref

protected DataReferenceImpl ref
DataReference whose data is linked to the socket stream.


alive

protected boolean alive
Whether the server is still active.

Constructor Detail

SocketDataServer

public SocketDataServer(int port,
                        DataReferenceImpl ref)
                 throws VisADException,
                        IOException
Construct a SocketDataServer with the given port and data reference.

Throws:
VisADException
IOException
Method Detail

killServer

public void killServer()
destroys this server and kills all associated threads