Package org.eclipse.jetty.start.config
Class DirConfigSource
- java.lang.Object
-
- org.eclipse.jetty.start.config.DirConfigSource
-
- All Implemented Interfaces:
ConfigSource
- Direct Known Subclasses:
JettyBaseConfigSource,JettyHomeConfigSource
public class DirConfigSource extends Object implements ConfigSource
A Directory basedConfigSource.Such as
${jetty.base}or and--include-jetty-dir=[path]sources.
-
-
Constructor Summary
Constructors Constructor Description DirConfigSource(String id, Path dir, int weight, boolean canHaveArgs)Create DirConfigSource with specified identifier and directory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)RawArgsgetArgs()The list of Arguments for this ConfigSourcePathgetDir()StringgetId()The identifier for this source.StringgetProperty(String key)Return the value of the specified property.PropsgetProps()The properties for this ConfigSourceSet<StartIni>getStartInis()intgetWeight()The weight of this source, used for proper ordering of the config source search order.inthashCode()booleanisPropertyBased()StringtoString()
-
-
-
Constructor Detail
-
DirConfigSource
public DirConfigSource(String id, Path dir, int weight, boolean canHaveArgs) throws IOException
Create DirConfigSource with specified identifier and directory.- Parameters:
id- the identifier for thisConfigSourcedir- the directory for thisConfigSourceweight- the configuration weight (used for search order)canHaveArgs- true if this directory can have start.ini or start.d entries. (false for directories like ${jetty.home}, for example)- Throws:
IOException- if unable to load the configuration args
-
-
Method Detail
-
getStartInis
public Set<StartIni> getStartInis()
- Specified by:
getStartInisin interfaceConfigSource
-
getArgs
public RawArgs getArgs()
Description copied from interface:ConfigSourceThe list of Arguments for this ConfigSource- Specified by:
getArgsin interfaceConfigSource- Returns:
- the list of Arguments for this ConfigSource
-
getDir
public Path getDir()
-
getId
public String getId()
Description copied from interface:ConfigSourceThe identifier for this source.Used in end-user display of the source.
- Specified by:
getIdin interfaceConfigSource- Returns:
- the configuration source identifier.
-
getProperty
public String getProperty(String key)
Description copied from interface:ConfigSourceReturn the value of the specified property.- Specified by:
getPropertyin interfaceConfigSource- 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:ConfigSourceThe properties for this ConfigSource- Specified by:
getPropsin interfaceConfigSource- Returns:
- the properties for this ConfigSource
-
getWeight
public int getWeight()
Description copied from interface:ConfigSourceThe 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:
getWeightin interfaceConfigSource- Returns:
- the weight of the config source. (lower value is more important)
-
isPropertyBased
public boolean isPropertyBased()
-
-