Class BundleFunctionLoader
- java.lang.Object
-
- org.jclouds.scriptbuilder.functionloader.osgi.BundleFunctionLoader
-
- All Implemented Interfaces:
FunctionLoader
public class BundleFunctionLoader extends Object implements FunctionLoader
AFunctionLoader
which searches for functions in theBundle
resources.
-
-
Constructor Summary
Constructors Constructor Description BundleFunctionLoader(org.osgi.framework.BundleContext bundleContext)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
loadFunction(String function, OsFamily family)
Loads the function from theBundle
resources.void
start()
Starts the loader.void
stop()
Unregisters itself from the service registry.
-
-
-
Method Detail
-
start
public void start()
Starts the loader. Looks up forBundle
resources and registers itself in the service registry. It adds a property to the service which advertise all the functions found in the local resources.
-
stop
public void stop()
Unregisters itself from the service registry.
-
loadFunction
public String loadFunction(String function, OsFamily family) throws FunctionNotFoundException
Loads the function from theBundle
resources.- Specified by:
loadFunction
in interfaceFunctionLoader
- Parameters:
function
- The function name to load.family
- This operating system family of the function.- Returns:
- Throws:
FunctionNotFoundException
-
-