Class BundleFunctionLoader
- java.lang.Object
 - 
- org.jclouds.scriptbuilder.functionloader.osgi.BundleFunctionLoader
 
 
- 
- All Implemented Interfaces:
 FunctionLoader
public class BundleFunctionLoader extends Object implements FunctionLoader
AFunctionLoaderwhich searches for functions in theBundleresources. 
- 
- 
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 StringloadFunction(String function, OsFamily family)Loads the function from theBundleresources.voidstart()Starts the loader.voidstop()Unregisters itself from the service registry. 
 - 
 
- 
- 
Method Detail
- 
start
public void start()
Starts the loader. Looks up forBundleresources 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 theBundleresources.- Specified by:
 loadFunctionin interfaceFunctionLoader- Parameters:
 function- The function name to load.family- This operating system family of the function.- Returns:
 - Throws:
 FunctionNotFoundException
 
 - 
 
 -