public interface ConnectionSources<T, S extends ConnectionSourceSettings> extends java.lang.Iterable, java.io.Closeable
Models multiple connection sources
T - The underlying native type of the ConnectionSource, for example a SQL javax.sql.DataSource| Type Params | Return Type | Name and description |
|---|---|---|
|
public ConnectionSource<T, S> |
addConnectionSource(java.lang.String name, PropertyResolver configuration)Adds a new ConnectionSource |
|
public ConnectionSource<T, S> |
addConnectionSource(java.lang.String name, java.util.Map<java.lang.String, java.lang.Object> configuration)Adds a new ConnectionSource |
|
public ConnectionSources<T, S> |
addListener(ConnectionSourcesListener<T, S> listener)Adds a listener |
|
public java.lang.Iterable<ConnectionSource<T, S>> |
getAllConnectionSources()
|
|
public PropertyResolver |
getBaseConfiguration()
|
|
public ConnectionSource<T, S> |
getConnectionSource(java.lang.String name)Obtain a ConnectionSource by name |
|
public ConnectionSource<T, S> |
getDefaultConnectionSource()Obtains the default ConnectionSource |
|
public ConnectionSourceFactory<T, S> |
getFactory()
|
| Methods inherited from class | Name |
|---|---|
interface java.lang.Iterable |
java.lang.Iterable#forEach(java.util.function.Consumer), java.lang.Iterable#iterator(), java.lang.Iterable#spliterator() |
interface java.io.Closeable |
java.io.Closeable#close() |
Adds a new ConnectionSource
name - The name of the connection sourceconfiguration - The configurationAdds a new ConnectionSource
name - The name of the connection sourceconfiguration - The configurationAdds a listener
listener - The listener
Obtain a ConnectionSource by name
name - The name of the sourceObtains the default ConnectionSource