|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectvisad.data.LinkedDataSource
visad.data.SocketDataSource
public class SocketDataSource
A class for linking a socket stream to a DataReference. Whenever the source data changes, the source presumably sends the change through the linked socket, and the DataReference is set to point at the new data.
| Field Summary | |
|---|---|
protected java.lang.Runnable |
comm
Code for monitoring socket for incoming source data changes. |
protected java.io.ObjectInputStream |
in
The input stream for the socket connection. |
protected java.io.ObjectOutputStream |
out
The output stream for the socket connection. |
protected java.net.Socket |
socket
The socket connection for this SocketDataSource. |
| Fields inherited from class visad.data.LinkedDataSource |
|---|
DEBUG, name |
| Constructor Summary | |
|---|---|
SocketDataSource(java.lang.String name)
Construct a SocketDataSource with the given name. |
|
| Method Summary | |
|---|---|
java.net.Socket |
getSocket()
Return the socket connection for this SocketDataSource. |
void |
open(java.lang.String id)
Link to the given socket, updating the local data whenever an update event is sent through that socket. |
void |
writeObject(java.lang.Object o)
Writes the specified object out to the socket. |
| Methods inherited from class visad.data.LinkedDataSource |
|---|
dataChanged, getName, getReference, isAlive |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.net.Socket socket
protected java.io.ObjectOutputStream out
protected java.io.ObjectInputStream in
protected java.lang.Runnable comm
| Constructor Detail |
|---|
public SocketDataSource(java.lang.String name)
| Method Detail |
|---|
public void open(java.lang.String id)
throws java.io.IOException,
VisADException,
java.rmi.RemoteException
open in class LinkedDataSourcejava.io.IOException
VisADException
java.rmi.RemoteExceptionpublic java.net.Socket getSocket()
public void writeObject(java.lang.Object o)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||