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 java.lang.Object implements ConfigSource
A Directory basedConfigSource
.Such as
${jetty.base}
or and--include-jetty-dir=[path]
sources.
-
-
Constructor Summary
Constructors Constructor Description DirConfigSource(java.lang.String id, java.nio.file.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 boolean
equals(java.lang.Object obj)
RawArgs
getArgs()
The list of Arguments for this ConfigSourcejava.nio.file.Path
getDir()
java.lang.String
getId()
The identifier for this source.java.lang.String
getProperty(java.lang.String key)
Return the value of the specified property.Props
getProps()
The properties for this ConfigSourcejava.util.Set<StartIni>
getStartInis()
int
getWeight()
The weight of this source, used for proper ordering of the config source search order.int
hashCode()
boolean
isPropertyBased()
java.lang.String
toString()
-
-
-
Constructor Detail
-
DirConfigSource
public DirConfigSource(java.lang.String id, java.nio.file.Path dir, int weight, boolean canHaveArgs) throws java.io.IOException
Create DirConfigSource with specified identifier and directory.- Parameters:
id
- the identifier for thisConfigSource
dir
- the directory for thisConfigSource
weight
- 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:
java.io.IOException
- if unable to load the configuration args
-
-
Method Detail
-
getStartInis
public java.util.Set<StartIni> getStartInis()
- Specified by:
getStartInis
in interfaceConfigSource
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
getArgs
public RawArgs getArgs()
Description copied from interface:ConfigSource
The list of Arguments for this ConfigSource- Specified by:
getArgs
in interfaceConfigSource
- Returns:
- the list of Arguments for this ConfigSource
-
getDir
public java.nio.file.Path getDir()
-
getId
public java.lang.String getId()
Description copied from interface:ConfigSource
The identifier for this source.Used in end-user display of the source.
- Specified by:
getId
in interfaceConfigSource
- Returns:
- the configuration source identifier.
-
getProperty
public java.lang.String getProperty(java.lang.String key)
Description copied from interface:ConfigSource
Return the value of the specified property.- Specified by:
getProperty
in 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:ConfigSource
The properties for this ConfigSource- Specified by:
getProps
in interfaceConfigSource
- 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 interfaceConfigSource
- Returns:
- the weight of the config source. (lower value is more important)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
isPropertyBased
public boolean isPropertyBased()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-