Class CompositeDataSourceConfiguration


  • public final class CompositeDataSourceConfiguration
    extends Object
    Configuration for CompositeDataSource. This object is mutable, and therefore not thread-safe.
    Author:
    carcassi
    • Constructor Detail

      • CompositeDataSourceConfiguration

        public CompositeDataSourceConfiguration()
        Creates a new configuration.
      • CompositeDataSourceConfiguration

        public CompositeDataSourceConfiguration​(InputStream input)
        Loads the configuration from the given input stream which must correspond to an XML file.
        Parameters:
        input - the xml configuration
    • Method Detail

      • getDelimiter

        public String getDelimiter()
        Returns the delimeter that divides the data source name from the channel name. Default is "://" so that "ca://pv1" corresponds to the "pv1" channel from the "ca" datasource.
        Returns:
        data source delimeter; can't be null
      • delimiter

        public CompositeDataSourceConfiguration delimiter​(String delimiter)
        Changes the data source delimiter.
        Parameters:
        delimiter - new data source delimiter; can't be null
        Returns:
        this
      • getDefaultDataSource

        public String getDefaultDataSource()
        Returns which data source is used if no data source is specified in the channel name.
        Returns:
        the default data source, or null if it was never set
      • defaultDataSource

        public CompositeDataSourceConfiguration defaultDataSource​(String defaultDataSource)
        Sets the data source to be used if the channel does not specify one explicitely. The data source must have already been added.
        Parameters:
        defaultDataSource - the default data source
        Returns:
        this data source configuration