Class BundleFunctionLoader

java.lang.Object
org.jclouds.scriptbuilder.functionloader.osgi.BundleFunctionLoader
All Implemented Interfaces:
FunctionLoader

public class BundleFunctionLoader extends Object implements FunctionLoader
A FunctionLoader which searches for functions in the Bundle resources.
  • Constructor Details

    • BundleFunctionLoader

      public BundleFunctionLoader(org.osgi.framework.BundleContext bundleContext)
      Constructor
      Parameters:
      bundleContext -
  • Method Details

    • start

      public void start()
      Starts the loader. Looks up for Bundle 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 the Bundle resources.
      Specified by:
      loadFunction in interface FunctionLoader
      Parameters:
      function - The function name to load.
      family - This operating system family of the function.
      Returns:
      Throws:
      FunctionNotFoundException