org.epics.pvmanager
Class DataSource

java.lang.Object
  extended by org.epics.pvmanager.DataSource
Direct Known Subclasses:
CompositeDataSource, JCADataSource, SimulationDataSource

public abstract class DataSource
extends java.lang.Object

A source for data that is going to be processed by the PVManager. PVManager can work with more than one source at a time. Support for each different source can be added by external libraries.

Author:
carcassi

Nested Class Summary
static class DataSource.ValueProcessor<P,V>
          Helper class that contains the logic for processing a new value.
 
Constructor Summary
DataSource()
           
 
Method Summary
abstract  void connect(DataRecipe recipe)
          Connects to a set of channels based on the given recipe.
abstract  void disconnect(DataRecipe recipe)
          Disconnects the set of channels given by the recipe.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataSource

public DataSource()
Method Detail

connect

public abstract void connect(DataRecipe recipe)
Connects to a set of channels based on the given recipe.

The data source must update the value caches relative to each channel. Before updating any cache, it must lock the collector relative to that cache and after any update it must notify the collector.

Parameters:
recipe - the instructions for the data connection

disconnect

public abstract void disconnect(DataRecipe recipe)
Disconnects the set of channels given by the recipe.

The disconnect call is guaranteed to be given the same object, so that the recipe itself can be used as a key in a map to retrieve the list of resources needed to be closed.

Parameters:
recipe - the instructions for the data connection


Copyright © 2010. All Rights Reserved.