Package hudson.init
Enum InitMilestone
- java.lang.Object
-
- java.lang.Enum<InitMilestone>
-
- hudson.init.InitMilestone
-
- All Implemented Interfaces:
Serializable
,Comparable<InitMilestone>
,org.jvnet.hudson.reactor.Milestone
public enum InitMilestone extends Enum<InitMilestone> implements org.jvnet.hudson.reactor.Milestone
Various key milestone in the initialization process of Hudson.Plugins can use these milestones to execute their initialization at the right moment (in addition to defining their own milestones by implementing
Milestone
.These milestones are achieve in this order:
- STARTED
- PLUGINS_LISTED
- PLUGINS_PREPARED
- PLUGINS_STARTED
- EXTENSIONS_AUGMENTED
- SYSTEM_CONFIG_LOADED
- SYSTEM_CONFIG_ADAPTED
- JOB_LOADED
- JOB_CONFIG_ADAPTED
- COMPLETED
- Author:
- Kohsuke Kawaguchi
-
-
Enum Constant Summary
Enum Constants Enum Constant Description COMPLETED
The very last milestone.EXTENSIONS_AUGMENTED
By this milestone, all programmatically constructed extension point implementations should be added.JOB_CONFIG_ADAPTED
By this milestone, any job configuration is adapted or updated just in case any plugin needs to update former/old configurations.JOB_LOADED
By this milestone, all jobs and their build records are loaded from disk.PLUGINS_LISTED
By this milestone, all plugins metadata are inspected and their dependencies figured out.PLUGINS_PREPARED
By this milestone, all plugin metadata are loaded and its classloader set up.PLUGINS_STARTED
By this milestone, all plugins start executing, all extension points loaded, descriptors instantiated and loaded.STARTED
The very first milestone that gets achieved without doing anything.SYSTEM_CONFIG_ADAPTED
By this milestone, the system configuration is adapted just in case any plugin (CasC might be an example) needs to update configuration filesSYSTEM_CONFIG_LOADED
By this milestone, all the system configurations are loaded from file system
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static org.jvnet.hudson.reactor.TaskBuilder
ordering()
Creates a set of dummy tasks to enforce ordering amongInitMilestone
s.String
toString()
static InitMilestone
valueOf(String name)
Returns the enum constant of this type with the specified name.static InitMilestone[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
STARTED
public static final InitMilestone STARTED
The very first milestone that gets achieved without doing anything. This is used inInitializer.after()
since annotations cannot have null as the default value.
-
PLUGINS_LISTED
public static final InitMilestone PLUGINS_LISTED
By this milestone, all plugins metadata are inspected and their dependencies figured out.
-
PLUGINS_PREPARED
public static final InitMilestone PLUGINS_PREPARED
By this milestone, all plugin metadata are loaded and its classloader set up.
-
PLUGINS_STARTED
public static final InitMilestone PLUGINS_STARTED
By this milestone, all plugins start executing, all extension points loaded, descriptors instantiated and loaded.This is a separate milestone from
PLUGINS_PREPARED
since the execution of a plugin often involves finding extension point implementations, which in turn require all the classes from all the plugins to be loadable.
-
EXTENSIONS_AUGMENTED
public static final InitMilestone EXTENSIONS_AUGMENTED
By this milestone, all programmatically constructed extension point implementations should be added.
-
SYSTEM_CONFIG_LOADED
public static final InitMilestone SYSTEM_CONFIG_LOADED
By this milestone, all the system configurations are loaded from file system- Since:
- 2.220
-
SYSTEM_CONFIG_ADAPTED
public static final InitMilestone SYSTEM_CONFIG_ADAPTED
By this milestone, the system configuration is adapted just in case any plugin (CasC might be an example) needs to update configuration files- Since:
- 2.220
-
JOB_LOADED
public static final InitMilestone JOB_LOADED
By this milestone, all jobs and their build records are loaded from disk.
-
JOB_CONFIG_ADAPTED
public static final InitMilestone JOB_CONFIG_ADAPTED
By this milestone, any job configuration is adapted or updated just in case any plugin needs to update former/old configurations. It does not includeGroovyInitScript
s which get executed later- Since:
- 2.220
-
COMPLETED
public static final InitMilestone COMPLETED
The very last milestone. All executions should be completed by it, includingGroovyInitScript
s. This is used inInitializer.before()
since annotations cannot have null as the default value.
-
-
Method Detail
-
values
public static InitMilestone[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (InitMilestone c : InitMilestone.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static InitMilestone valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
ordering
public static org.jvnet.hudson.reactor.TaskBuilder ordering()
Creates a set of dummy tasks to enforce ordering amongInitMilestone
s.
-
toString
public String toString()
- Overrides:
toString
in classEnum<InitMilestone>
-
-