Package org.restlet.engine.internal
Class Activator
- java.lang.Object
-
- org.restlet.engine.internal.Activator
-
- All Implemented Interfaces:
org.osgi.framework.BundleActivator
public class Activator extends java.lang.Object implements org.osgi.framework.BundleActivatorOSGi activator. It registers the NRE into the Restlet API and also introspect the bundles to find connector or authentication helpers.
-
-
Constructor Summary
Constructors Constructor Description Activator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidregisterHelper(org.osgi.framework.Bundle bundle, java.util.List<?> helpers, java.lang.Class<?> constructorClass, java.lang.String descriptorPath)Registers the helpers for a given bundle.private voidregisterHelper(org.osgi.framework.Bundle bundle, java.util.List<?> helpers, java.lang.Class<?> constructorClass, java.net.URL descriptorUrl)Registers the helpers for a given bundle.private voidregisterHelpers(org.osgi.framework.Bundle bundle)Registers the helpers for a given bundle.voidstart(org.osgi.framework.BundleContext context)Starts the OSGi bundle by registering the engine with the bundle of the Restlet API.voidstop(org.osgi.framework.BundleContext context)Stops the OSGi bundle by unregistering the engine with the bundle of the Restlet API.
-
-
-
Method Detail
-
registerHelper
private void registerHelper(org.osgi.framework.Bundle bundle, java.util.List<?> helpers, java.lang.Class<?> constructorClass, java.lang.String descriptorPath)Registers the helpers for a given bundle.- Parameters:
bundle- The bundle to inspect.helpers- The helpers list to update.constructorClass- The class to use as constructor parameter.descriptorPath- The descriptor file path.
-
registerHelper
private void registerHelper(org.osgi.framework.Bundle bundle, java.util.List<?> helpers, java.lang.Class<?> constructorClass, java.net.URL descriptorUrl)Registers the helpers for a given bundle.- Parameters:
bundle- The bundle to inspect.helpers- The helpers list to update.constructorClass- The class to use as constructor parameter.descriptorUrl- The descriptor URL to inspect.
-
registerHelpers
private void registerHelpers(org.osgi.framework.Bundle bundle)
Registers the helpers for a given bundle.- Parameters:
bundle- The bundle to inspect.
-
start
public void start(org.osgi.framework.BundleContext context) throws java.lang.ExceptionStarts the OSGi bundle by registering the engine with the bundle of the Restlet API.- Specified by:
startin interfaceorg.osgi.framework.BundleActivator- Parameters:
context- The bundle context.- Throws:
java.lang.Exception
-
stop
public void stop(org.osgi.framework.BundleContext context) throws java.lang.ExceptionStops the OSGi bundle by unregistering the engine with the bundle of the Restlet API.- Specified by:
stopin interfaceorg.osgi.framework.BundleActivator- Parameters:
context- The bundle context.- Throws:
java.lang.Exception
-
-