public class IlpDefaultDataSourceManager extends Object implements IlpMutableDataSourceManager
This default implementation maintains a collection of data sources. They are referenced through weak references that do not prevent garbage collection.
IlpDataSourceLoggers.ilog_cpl_datasource| Constructor and Description |
|---|
IlpDefaultDataSourceManager()
Creates a new data source manager.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDataSource(IlpDataSource aDataSource)
Adds a data source to this manager.
|
void |
addDataSourceManagerListener(DataSourceManagerListener listener)
Adds a listener to data source manager events.
|
Collection<IlpDataSource> |
getDataSources()
Returns the data sources created in the context of this data source manager.
|
boolean |
hasDataSource(IlpDataSource aDataSource)
Returns
true if the given data source belongs to this manager. |
void |
removeDataSource(IlpDataSource aDataSource)
Removes a data source from this manager.
|
void |
removeDataSourceManagerListener(DataSourceManagerListener listener)
Removes the given listener from data source manager events.
|
public IlpDefaultDataSourceManager()
public Collection<IlpDataSource> getDataSources()
getDataSources in interface IlpDataSourceManagerCollection containing the known data sources.IlpDataSourcepublic boolean hasDataSource(IlpDataSource aDataSource)
true if the given data source belongs to this manager.hasDataSource in interface IlpDataSourceManageraDataSource - The data source being checked.true if the data source belongs to the manager.IllegalArgumentException - if the given data source is invalid.public void addDataSource(IlpDataSource aDataSource)
addDataSource in interface IlpMutableDataSourceManageraDataSource - The data source being added.public void removeDataSource(IlpDataSource aDataSource)
removeDataSource in interface IlpMutableDataSourceManageraDataSource - The data source to be removed.public void addDataSourceManagerListener(DataSourceManagerListener listener)
The listener will receive DataSourceManagerEvents whenever a
data source is added or removed from this manager, through the use of methods
addDataSource and removeDataSource.
This data source manager implementation does not prevent data sources from being garbage collected. When a data source is removed through the garbage collection process, notifications are not sent to the listeners.
addDataSourceManagerListener in interface IlpMutableDataSourceManageraddDataSource(ilog.cpl.datasource.IlpDataSource),
removeDataSource(ilog.cpl.datasource.IlpDataSource)public void removeDataSourceManagerListener(DataSourceManagerListener listener)
removeDataSourceManagerListener in interface IlpMutableDataSourceManager© Copyright Rogue Wave Software, Inc. 1997, 2017. All Rights Reserved.