Class DataSourceConfiguration

  • All Implemented Interfaces:
    java.io.Serializable

    public class DataSourceConfiguration
    extends java.lang.Object
    implements java.io.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 Detail

      • DataSourceConfiguration

        public DataSourceConfiguration()
    • Method Detail

      • addJdbcDataSource

        public void addJdbcDataSource​(JdbcDataSource vJdbcDataSource)
                               throws java.lang.IndexOutOfBoundsException
        Parameters:
        vJdbcDataSource -
        Throws:
        java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection
      • addJdbcDataSource

        public void addJdbcDataSource​(int index,
                                      JdbcDataSource vJdbcDataSource)
                               throws java.lang.IndexOutOfBoundsException
        Parameters:
        index -
        vJdbcDataSource -
        Throws:
        java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection
      • enumerateJdbcDataSource

        public java.util.Enumeration<JdbcDataSource> enumerateJdbcDataSource()
        Method enumerateJdbcDataSource.
        Returns:
        an Enumeration over all possible elements of this collection
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides the Object.equals method.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj -
        Returns:
        true if the objects are equal.
      • 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 java.lang.IndexOutOfBoundsException
        Method getJdbcDataSource.
        Parameters:
        index -
        Returns:
        the value of the JdbcDataSource at the given index
        Throws:
        java.lang.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 java.util.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.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        a hash code value for the object.
      • iterateJdbcDataSource

        public java.util.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 java.lang.IndexOutOfBoundsException
        Parameters:
        index -
        vJdbcDataSource -
        Throws:
        java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection
      • setJdbcDataSource

        public void setJdbcDataSource​(JdbcDataSource[] vJdbcDataSourceArray)
        Parameters:
        vJdbcDataSourceArray -
      • setJdbcDataSource

        public void setJdbcDataSource​(java.util.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​(java.util.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.