Class DataSourceConfiguration
- java.lang.Object
-
- org.opennms.netmgt.config.opennmsDataSources.DataSourceConfiguration
-
- All Implemented Interfaces:
Serializable
public class DataSourceConfiguration extends Object implements Serializable
Top Level element for opennms-datasources.xml... a list of data sources to be used within OpenNMS.- Version:
- $Revision$ $Date$
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DataSourceConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addJdbcDataSource(int index, JdbcDataSource vJdbcDataSource)
void
addJdbcDataSource(JdbcDataSource vJdbcDataSource)
Enumeration<JdbcDataSource>
enumerateJdbcDataSource()
Method enumerateJdbcDataSource.boolean
equals(Object obj)
Overrides the Object.equals method.ConnectionPool
getConnectionPool()
Returns the value of field 'connectionPool'.JdbcDataSource[]
getJdbcDataSource()
Method getJdbcDataSource.Returns the contents of the collection in an Array.JdbcDataSource
getJdbcDataSource(int index)
Method getJdbcDataSource.List<JdbcDataSource>
getJdbcDataSourceCollection()
Method getJdbcDataSourceCollection.Returns a reference to 'jdbcDataSourceList'.int
getJdbcDataSourceCount()
Method getJdbcDataSourceCount.int
hashCode()
Method hashCode.Iterator<JdbcDataSource>
iterateJdbcDataSource()
Method iterateJdbcDataSource.void
removeAllJdbcDataSource()
boolean
removeJdbcDataSource(JdbcDataSource vJdbcDataSource)
Method removeJdbcDataSource.JdbcDataSource
removeJdbcDataSourceAt(int index)
Method removeJdbcDataSourceAt.void
setConnectionPool(ConnectionPool connectionPool)
Sets the value of field 'connectionPool'.void
setJdbcDataSource(int index, JdbcDataSource vJdbcDataSource)
void
setJdbcDataSource(List<JdbcDataSource> vJdbcDataSourceList)
Sets the value of 'jdbcDataSourceList' by copying the given Vector.void
setJdbcDataSource(JdbcDataSource[] vJdbcDataSourceArray)
void
setJdbcDataSourceCollection(List<JdbcDataSource> jdbcDataSourceList)
Deprecated.
-
-
-
Method Detail
-
addJdbcDataSource
public void addJdbcDataSource(JdbcDataSource vJdbcDataSource) throws IndexOutOfBoundsException
- Parameters:
vJdbcDataSource
-- Throws:
IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
addJdbcDataSource
public void addJdbcDataSource(int index, JdbcDataSource vJdbcDataSource) throws IndexOutOfBoundsException
- Parameters:
index
-vJdbcDataSource
-- Throws:
IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
enumerateJdbcDataSource
public Enumeration<JdbcDataSource> enumerateJdbcDataSource()
Method enumerateJdbcDataSource.- Returns:
- an Enumeration over all possible elements of this collection
-
equals
public boolean equals(Object obj)
Overrides the Object.equals method.
-
getConnectionPool
public ConnectionPool getConnectionPool()
Returns the value of field 'connectionPool'. The field 'connectionPool' has the following description: Database connection pool configuration.- Returns:
- the value of field 'ConnectionPool'.
-
getJdbcDataSource
public JdbcDataSource getJdbcDataSource(int index) throws IndexOutOfBoundsException
Method getJdbcDataSource.- Parameters:
index
-- Returns:
- the value of the JdbcDataSource at the given index
- Throws:
IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
getJdbcDataSource
public JdbcDataSource[] getJdbcDataSource()
Method getJdbcDataSource.Returns the contents of the collection in an Array.Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.
- Returns:
- this collection as an Array
-
getJdbcDataSourceCollection
public List<JdbcDataSource> getJdbcDataSourceCollection()
Method getJdbcDataSourceCollection.Returns a reference to 'jdbcDataSourceList'. No type checking is performed on any modifications to the Vector.- Returns:
- a reference to the Vector backing this class
-
getJdbcDataSourceCount
public int getJdbcDataSourceCount()
Method getJdbcDataSourceCount.- Returns:
- the size of this collection
-
hashCode
public int hashCode()
Method hashCode.
-
iterateJdbcDataSource
public Iterator<JdbcDataSource> iterateJdbcDataSource()
Method iterateJdbcDataSource.- Returns:
- an Iterator over all possible elements in this collection
-
removeAllJdbcDataSource
public void removeAllJdbcDataSource()
-
removeJdbcDataSource
public boolean removeJdbcDataSource(JdbcDataSource vJdbcDataSource)
Method removeJdbcDataSource.- Parameters:
vJdbcDataSource
-- Returns:
- true if the object was removed from the collection.
-
removeJdbcDataSourceAt
public JdbcDataSource removeJdbcDataSourceAt(int index)
Method removeJdbcDataSourceAt.- Parameters:
index
-- Returns:
- the element removed from the collection
-
setConnectionPool
public void setConnectionPool(ConnectionPool connectionPool)
Sets the value of field 'connectionPool'. The field 'connectionPool' has the following description: Database connection pool configuration.- Parameters:
connectionPool
- the value of field 'connectionPool'.
-
setJdbcDataSource
public void setJdbcDataSource(int index, JdbcDataSource vJdbcDataSource) throws IndexOutOfBoundsException
- Parameters:
index
-vJdbcDataSource
-- Throws:
IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
setJdbcDataSource
public void setJdbcDataSource(JdbcDataSource[] vJdbcDataSourceArray)
- Parameters:
vJdbcDataSourceArray
-
-
setJdbcDataSource
public void setJdbcDataSource(List<JdbcDataSource> vJdbcDataSourceList)
Sets the value of 'jdbcDataSourceList' by copying the given Vector. All elements will be checked for type safety.- Parameters:
vJdbcDataSourceList
- the Vector to copy.
-
setJdbcDataSourceCollection
public void setJdbcDataSourceCollection(List<JdbcDataSource> jdbcDataSourceList)
Deprecated.Sets the value of 'jdbcDataSourceList' by setting it to the given Vector. No type checking is performed.- Parameters:
jdbcDataSourceList
- the Vector to set.
-
-