visad.data
Class LinkedDataSource

java.lang.Object
  extended by visad.data.LinkedDataSource
Direct Known Subclasses:
SocketDataSource

public abstract class LinkedDataSource
extends Object

A class for linking a data source (e.g., a URL) with a DataReference. Whenever the data changes at the source, the new data is automatically loaded and the DataReference is set to point to it. VisAD applications can then use a CellImpl with the DataReference object in order to detect changes to the data at its source.


Field Summary
protected static boolean DEBUG
          Debugging flag.
protected  String name
          The name of this LinkedDataSource.
 
Constructor Summary
LinkedDataSource(String name)
          Construct a LinkedDataSource with the given name.
 
Method Summary
 void dataChanged(Data data)
          Update the data to which this LinkedDataSource is linked.
 String getName()
          Return the name of this LinkedDataSource.
 DataReferenceImpl getReference()
          Return the DataReference for this LinkedDataSource.
 boolean isAlive()
          Return whether the connection to the data source is still alive.
abstract  void open(String id)
          Load initial data from the given data source and remain linked to the data source, monitoring it for changes to the data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

protected static final boolean DEBUG
Debugging flag.

See Also:
Constant Field Values

name

protected String name
The name of this LinkedDataSource.

Constructor Detail

LinkedDataSource

public LinkedDataSource(String name)
Construct a LinkedDataSource with the given name.

Method Detail

open

public abstract void open(String id)
                   throws IOException,
                          VisADException,
                          RemoteException
Load initial data from the given data source and remain linked to the data source, monitoring it for changes to the data.

Throws:
IOException
VisADException
RemoteException

dataChanged

public void dataChanged(Data data)
                 throws VisADException,
                        RemoteException
Update the data to which this LinkedDataSource is linked.

Throws:
VisADException
RemoteException

getName

public String getName()
Return the name of this LinkedDataSource.


getReference

public DataReferenceImpl getReference()
Return the DataReference for this LinkedDataSource.


isAlive

public boolean isAlive()
Return whether the connection to the data source is still alive.