Class ManifestLoader
java.lang.Object
de.uni_hildesheim.sse.easy.loader.AbstractStartupInfoLoader
de.uni_hildesheim.sse.easy.loader.ManifestLoader
- All Implemented Interfaces:
ILoader
Experimental: Loader that identifies the available services/activators from Manifests.
- Author:
- Holger Eichelberger
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a manifest loader with initially non-verbose output.ManifestLoader(boolean verbose) Creates a manifest loader.ManifestLoader(boolean verbose, ClassLoader loader) Creates a manifest loader.ManifestLoader(ClassLoader loader) Creates a manifest loader with initially non-verbose output. -
Method Summary
Modifier and TypeMethodDescriptionstatic StartupInfoloadManifest(URL url, DocumentBuilder builder, boolean verbose) Load a given manifest.static List<StartupInfo> loadManifests(boolean verbose, ClassLoader loader) Loads the available manifests.voidsetLoader(ClassLoader loader) Sets the class loader for loading EASy bundles.Methods inherited from class de.uni_hildesheim.sse.easy.loader.AbstractStartupInfoLoader
getLoader, isVerbose, setStartupSequence, setVerbose, shutdown, startup
-
Field Details
-
MF_PATH
The default (relative) manifest path: "META-INF/MANIFEST.MF".- See Also:
-
-
Constructor Details
-
ManifestLoader
Creates a manifest loader with initially non-verbose output.- Throws:
IOException- if loading fails
-
ManifestLoader
Creates a manifest loader with initially non-verbose output.- Parameters:
loader- the resource/bundle loader, may be null for default (this class/this thread context)- Throws:
IOException- if loading fails
-
ManifestLoader
Creates a manifest loader.- Parameters:
verbose- whether verbose output shall be produced- Throws:
IOException- if loading fails
-
ManifestLoader
Creates a manifest loader.- Parameters:
verbose- whether verbose output shall be producedloader- the resource/bundle loader, may be null for default (this class/this thread context)- Throws:
IOException- if loading fails
-
-
Method Details
-
setLoader
Description copied from interface:ILoaderSets the class loader for loading EASy bundles. By default, the class loader of the implementing class is used.- Specified by:
setLoaderin interfaceILoader- Overrides:
setLoaderin classAbstractStartupInfoLoader- Parameters:
loader- the loader, ignored if null
-
loadManifests
public static List<StartupInfo> loadManifests(boolean verbose, ClassLoader loader) throws IOException Loads the available manifests.- Parameters:
verbose- whether verbose output shall be producedloader- the classloader to get the manifest resources from, may be null for this thread context- Returns:
- information instances about the loaded services/activators
- Throws:
IOException- if loading fails
-
loadManifest
public static StartupInfo loadManifest(URL url, DocumentBuilder builder, boolean verbose) throws IOException Load a given manifest.- Parameters:
url- the URL of the manifestbuilder- a re-usable document builderverbose- produce verbose output- Returns:
- information instances about the loaded services/activators
- Throws:
IOException- if loading fails
-