Class CommandLineConfigSource

  • All Implemented Interfaces:
    ConfigSource

    public class CommandLineConfigSource
    extends Object
    implements ConfigSource
    Configuration Source representing the Command Line arguments.
    • Constructor Detail

      • CommandLineConfigSource

        public CommandLineConfigSource​(String[] rawargs)
    • Method Detail

      • getArgs

        public RawArgs getArgs()
        Description copied from interface: ConfigSource
        The list of Arguments for this ConfigSource
        Specified by:
        getArgs in interface ConfigSource
        Returns:
        the list of Arguments for this ConfigSource
      • getBasePath

        public Path getBasePath()
      • getHomePath

        public Path getHomePath()
      • getId

        public String getId()
        Description copied from interface: ConfigSource
        The identifier for this source.

        Used in end-user display of the source.

        Specified by:
        getId in interface ConfigSource
        Returns:
        the configuration source identifier.
      • getProperty

        public String getProperty​(String key)
        Description copied from interface: ConfigSource
        Return the value of the specified property.
        Specified by:
        getProperty in interface ConfigSource
        Parameters:
        key - the key to lookup
        Returns:
        the value of the property, or null if not found
      • getProps

        public Props getProps()
        Description copied from interface: ConfigSource
        The properties for this ConfigSource
        Specified by:
        getProps in interface ConfigSource
        Returns:
        the properties for this ConfigSource
      • getWeight

        public int getWeight()
        Description copied from interface: ConfigSource
        The weight of this source, used for proper ordering of the config source search order.

        Recommended Weights:

                   -1 = the command line
                    0 = the ${jetty.base} source
               [1..n] = include-jetty-dir entries from command line
             [n+1..n] = include-jetty-dir entries from start.ini (or start.d/*.ini) 
              9999999 = the ${jetty.home} source
         
        Specified by:
        getWeight in interface ConfigSource
        Returns:
        the weight of the config source. (lower value is more important)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • setSystemProperty

        public void setSystemProperty​(String key,
                                      String value)