public final class Locator extends Object
| Modifier and Type | Method and Description |
|---|---|
static List<net.adamcin.oakpal.api.ProgressCheck> |
loadFromCheckSpecs(List<CheckSpec> checkSpecs)
Load a list of ProgressChecks from from a list of CheckSpecs using the default classloader.
|
static List<net.adamcin.oakpal.api.ProgressCheck> |
loadFromCheckSpecs(List<CheckSpec> checkSpecs,
ClassLoader checkLoader)
Load a list of ProgressChecks from from a list of CheckSpecs using the provided classloader.
|
static net.adamcin.oakpal.api.ProgressCheck |
loadProgressCheck(String impl)
Attempt to load a
ProgressCheck from the class path. |
static net.adamcin.oakpal.api.ProgressCheck |
loadProgressCheck(String impl,
javax.json.JsonObject config)
Attempt to load a
ProgressCheck from a particular class loader. |
static net.adamcin.oakpal.api.ProgressCheck |
loadProgressCheck(String impl,
javax.json.JsonObject config,
ClassLoader classLoader)
Attempt to load a
ProgressCheck from a particular class loader. |
static net.adamcin.oakpal.api.ProgressCheck |
wrapWithAlias(net.adamcin.oakpal.api.ProgressCheck progressCheck,
String alias)
Rename the provided package check with the provided alias.
|
public static net.adamcin.oakpal.api.ProgressCheck loadProgressCheck(String impl) throws Exception
ProgressCheck from the class path.impl - className or resourceNameProgressCheck instance for the given nameException - on any error or failure to find a resource for given name.public static net.adamcin.oakpal.api.ProgressCheck loadProgressCheck(String impl, javax.json.JsonObject config) throws Exception
ProgressCheck from a particular class loader.impl - className or resourceNameconfig - provide an optional config object (may be ignored by the check.)ProgressCheck instance for the given nameException - on any error or failure to find a resource for given name.public static net.adamcin.oakpal.api.ProgressCheck loadProgressCheck(String impl, javax.json.JsonObject config, ClassLoader classLoader) throws Exception
ProgressCheck from a particular class loader. The impl value is first tried as
a fully-qualified class name, and if a Class<?> is found, it is first checked for the
ProgressCheckFactory interface, and then for the ProgressCheck interface. If a class is not
found, Locator assumes the impl value represents a resource name for an
Invocable script, and attempts to create a ScriptProgressCheck from it.impl - className or resourceNameconfig - provide an optional config object (may be ignored by the check.)classLoader - a specific classLoader to useProgressCheck instance for the given nameException - on any error or failure to find a resource for given name.public static net.adamcin.oakpal.api.ProgressCheck wrapWithAlias(net.adamcin.oakpal.api.ProgressCheck progressCheck,
String alias)
progressCheck - the check to rename.alias - the name to override ProgressCheck.getCheckName().public static List<net.adamcin.oakpal.api.ProgressCheck> loadFromCheckSpecs(List<CheckSpec> checkSpecs) throws Exception
checkSpecs - the list of CheckSpecsException - for validation errorspublic static List<net.adamcin.oakpal.api.ProgressCheck> loadFromCheckSpecs(List<CheckSpec> checkSpecs, ClassLoader checkLoader) throws Exception
checkSpecs - the list of CheckSpecscheckLoader - the classloader to useException - for validation errorsCopyright © 2017–2020. All rights reserved.