org.jclouds.scriptbuilder.functionloader.osgi
Class ServiceFunctionLoader

java.lang.Object
  extended by org.jclouds.scriptbuilder.functionloader.osgi.ServiceFunctionLoader
All Implemented Interfaces:
FunctionLoader

public class ServiceFunctionLoader
extends Object
implements FunctionLoader

A FunctionLoader implementation which delegates loading to the OSGi service registry.


Constructor Summary
ServiceFunctionLoader(org.osgi.framework.BundleContext bundleContext)
           
 
Method Summary
 String loadFunction(String function, OsFamily family)
          Looks up the service registry for an applicable FunctionLoader and delegates to it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceFunctionLoader

public ServiceFunctionLoader(org.osgi.framework.BundleContext bundleContext)
Method Detail

loadFunction

public String loadFunction(String function,
                           OsFamily family)
                    throws FunctionNotFoundException
Looks up the service registry for an applicable FunctionLoader and delegates to it.

Specified by:
loadFunction in interface FunctionLoader
Parameters:
function - The function name to load.
family - This operating system family of the function.
Returns:
The function as String
Throws:
FunctionNotFoundException


Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.