util.rmi
Interface RmiDataSink

All Superinterfaces:
Remote
All Known Implementing Classes:
AbstractRmiDataSink, JDataSink, JPhasePlot

public interface RmiDataSink
extends Remote

A data sink acts as an rmi-server capable of handling data of a certain type issued to it via an RMI-call. The only data format allowed is a list of VectorG elements, which can either be added, #addData or set (i.e. replace old data if there is any) with #setData. Some sinks may also need #metaData assigned to before they can definitely answer the #acceptsData question. Metadata might be as simple as a designation which indices carries dependent and independent variables, error estimates to this data etc. Some sinks may further be RmiVariableDepending.

Proper implementations of this interface may display data in a datacanvas.


Method Summary
 boolean rmiAcceptsData(String type)
          Return true, if this sink accepts the flavour of this data.
 boolean rmiAddData(List<VectorG> d)
          Adds this data to the sink.
 boolean rmiAddData(Map<Object,VectorG> d)
          For data that is not discernible by an index, but rather by a key.
 boolean rmiClearData()
          Clears all data.
 boolean rmiMetaData(Map<String,? extends Serializable> meta)
          Assigns some meta-data to the data sink, providing additional information on how to interpret the data.
 boolean rmiSetData(List<VectorG> d)
          Sets this data as the only data in the sink.
 boolean rmiSetData(Map<Object,VectorG> d)
          For data that is not discernible by an index, but rather by a key.
 

Method Detail

rmiAcceptsData

boolean rmiAcceptsData(String type)
                       throws RemoteException
Return true, if this sink accepts the flavour of this data. Returning true here does not guarantee that #addData or #setData return true, but returning false here guarantees that these both methods will return false and thus the effort can be spared.
Must accept the null-String, as clients may not know their data type.

Returns:
True, if this sink might use thi type of data.
Throws:
RemoteException

rmiMetaData

boolean rmiMetaData(Map<String,? extends Serializable> meta)
                    throws RemoteException
Assigns some meta-data to the data sink, providing additional information on how to interpret the data. Some common keys may include index of the independt variable(s), the index of a measurement error etc. If the provided information is sufficient, maybe also including some default settings, this method should return true.

Returns:
False, if we cannot interprete data with the information available.
Throws:
RemoteException

rmiClearData

boolean rmiClearData()
                     throws RemoteException
Clears all data. Calling #setData should have the same effect as calling this method, followed by an addData.

Returns:
True, if at least a single data point has been deleted.
Throws:
RemoteException

rmiAddData

boolean rmiAddData(List<VectorG> d)
                   throws RemoteException
Adds this data to the sink. If processing the data takes too long, an individual thread should be started.

Returns:
True, if we can interprete this data.
Throws:
RemoteException

rmiAddData

boolean rmiAddData(Map<Object,VectorG> d)
                   throws RemoteException
For data that is not discernible by an index, but rather by a key.

Throws:
RemoteException

rmiSetData

boolean rmiSetData(List<VectorG> d)
                   throws RemoteException
Sets this data as the only data in the sink. If processing the data takes too long, an individual thread should be started.

Returns:
True, if we can interprete this data.
Throws:
RemoteException

rmiSetData

boolean rmiSetData(Map<Object,VectorG> d)
                   throws RemoteException
For data that is not discernible by an index, but rather by a key.

Throws:
RemoteException