uk.co.bigbeeconsultants

bconfig

package bconfig

Visibility
  1. Public
  2. All

Type Members

  1. final class ClasspathConfigSource extends ClasspathConfigSourceJ with ConfigSource

    Sources configuration data from a resource on the classpath.

  2. final class Config extends ListMap[String, String]

    Provides configuration data in the form of a Scala map.

    Provides configuration data in the form of a Scala map. Normally, the class constructor shouldn't be used; instead, the object 'apply' factory methods provide all the necessary parsing and string interpolation behaviour.

  3. trait ConfigSource extends ConfigSourceJ

    Defines an arbitrary source for configuration data.

    Defines an arbitrary source for configuration data. The name is used in exception messages should any arise.

  4. final class FileConfigSource extends FileConfigSourceJ with ConfigSource

    Sources configuration data from a file.

  5. class MutableConfig extends AnyRef

    Provides a mutable wrapper for Config, principally for use within JMX.

    Provides a mutable wrapper for Config, principally for use within JMX. To obtain a JMX-based instance, use uk.co.bigbeeconsultants.bconfig.jmx.ConfigJmx register.

    This class should be safe for concurrent access by multiple threads because updates are performed atomically. Updates follow an 'eventually consistent' model: whilst updating, concurrent reads will either obtain the old value or the new value but not fail to obtain any.

  6. final class Parser extends ParserJ

    Constructs a parser around an input stream, which may be null.

    Constructs a parser around an input stream, which may be null. If null, the parser constructs an empty map, otherwise a map is constructed containing the key/value pairs from the input stream's data.

    The constructor loads a text file containing configuration strings and splits the strings into key/value pairs. The text files must be UTF, and may use any of the UTF byte-order marks to differentiate their contents. See UTF BOM.

    The input stream will always get closed by the Parser constructor (provided it isn't null).

    Typically, this class is only used indirectly; the Parser object provides convenience methods for dealing with various sources.

    Note that this implementation is simply a wrapper for the Java ParserJ. As such, its use is deprecated. It is possible that the class (but not the object) will be deleted in a future version.

    Annotations
    @throws( classOf[IOException] )
  7. final class ReadableOnceConfigSource extends ReadableOnceConfigSourceJ with ConfigSource

    Sources configuration data from an input stream that will be read once only then closed.

    Sources configuration data from an input stream that will be read once only then closed. The name is used in exception messages should any arise.

    After the input stream has been opened once, an IllegalStateException is thrown on any subsequent attempt to open it.

  8. class Reloader extends AnyRef

    Wraps uk.co.bigbeeconsultants.bconfig.Config loading so that changes to the source can be reloaded dynamically.

    Wraps uk.co.bigbeeconsultants.bconfig.Config loading so that changes to the source can be reloaded dynamically. All subsequent access to the configuration should be via the config method, which will ensure that changes are automatically reloaded from disk (or wherever) in a timely way.

    It is safe to share reloaders between multiple calling threads.

  9. class SourceChangeDetector extends AnyRef

    Provides a tool for detecting changes in a ConfigSourceJ, typically intended for observing changed files via their last modified timestamps.

    Provides a tool for detecting changes in a ConfigSourceJ, typically intended for observing changed files via their last modified timestamps. Polling is done economically: (a) it is only done by the calling thread (no background threads are needed), and (b) a max-age parameter sets a band of time during which updates are ignored.

Value Members

  1. object ClasspathConfigSource

  2. object Config extends Serializable

    Provides the factory methods for constructing instances from various sources.

    Provides the factory methods for constructing instances from various sources. The sources are parsed and string interpolations are resolved. A 'daisy-chain' cascade of successive configurations is possible. This is where the resultant set of keys is the set union of those in this configuration and those in the fallback's. For every overlapping key, the fallback's value is overridden by this configuration, which takes precedence.

    When interpolating strings, all the keys known at the point of the interpolation are available, including those only defined in the fallback. This is done only once on each configuration, when it is loaded. Therefore, if a configuration is later used as a fallback for another, its interpolations do not get re-evaluated when the later configuration is loaded. This minor limitation allows considerable benefit in that the memory footprint and processing effort are both low; the converse of evaluating interpolations on the fly would be that processing effort would be higher, or about twice as much memory would be needed, or both.

  3. object FileConfigSource

  4. object Parser

    Parses configuration files via the readXxx methods.

    Parses configuration files via the readXxx methods. This is done by creating an instance of Parser.

    Note that the data source arguments used by the readXxx methods must not be null. If you would prefer to read from a nullable input stream, create your own uk.co.bigbeeconsultants.bconfig.Parser instance directly.

  5. object ReadableOnceConfigSource

  6. object Reloader

    Wraps uk.co.bigbeeconsultants.bconfig.Config loading so that changes to the source can be reloaded dynamically.

  7. package jmx

  8. package reflect

Ungrouped