simtools.data
Interface DataSourceProvider

All Known Implementing Classes:
AsciiFileDataSourceProvider, AsciiProvider, DataSourceAnimatorProvider, DataSourceAnimatorProvider, DataSourceCollectionAnimatorProvider, DataSourceCollectionAnimatorProvider, DataSourceProvider, ExpressionDataSourceProvider, FileDataSourceProvider, JSMergeDSCollectionProvider, LinearSinusDataSourceProvider, RandomDataPlugin, RandomSourceProvider, RangeSourceProvider, SocketDataPlugin

public interface DataSourceProvider

Datasource providers are especially used to get datasource references back from ids, during internalization, and to get optional information (if any) about the datasources, during serialization.

Version:
1.0 2001
Author:
Nicolas Brodu

Method Summary
 java.lang.Object getOptionalInformation(DataSource ds, DataSourceCollection dsc)
          Asks this provider some optional information about a datasource and possibly its collection.
 DataSource provide(java.lang.String id, java.lang.String dscId, java.lang.Object optionalInformation, DataSourcePool pool)
          Asks this provider to resolve a symbolic datasource reference.
 

Method Detail

getOptionalInformation

java.lang.Object getOptionalInformation(DataSource ds,
                                        DataSourceCollection dsc)
Asks this provider some optional information about a datasource and possibly its collection.

Parameters:
ds - The datasource
dsc - The datasource collection, or null.
Returns:
null if this provider cannot provide optional information, an arbitrary object otherwise.

provide

DataSource provide(java.lang.String id,
                   java.lang.String dscId,
                   java.lang.Object optionalInformation,
                   DataSourcePool pool)
Asks this provider to resolve a symbolic datasource reference.

Parameters:
id - The symbolic id of a datasource
dscId - The symbolic id of a datasourceCollection. May be null
optionalInformation - Can be set to help this provider. May be null
pool - DataSourcePool in which to add the source and collection if they can be provided. May be null.
Returns:
The desired datasource if it can be provided, or null.