public class JettyBootstrapActivator extends Object implements org.osgi.framework.BundleActivator
Constructor and Description |
---|
JettyBootstrapActivator() |
Modifier and Type | Method and Description |
---|---|
static org.osgi.framework.BundleContext |
getBundleContext() |
static JettyBootstrapActivator |
getInstance() |
static void |
registerContext(org.osgi.framework.Bundle contributor,
String contextFilePath)
Helper method that creates a new skeleton of a ContextHandler and
registers it as an OSGi service.
|
static void |
registerContext(org.osgi.framework.Bundle contributor,
String contextFilePath,
Dictionary<String,String> dic)
Helper method that creates a new skeleton of a ContextHandler and
registers it as an OSGi service.
|
static void |
registerWebapplication(org.osgi.framework.Bundle contributor,
String webappFolderPath,
String contextPath)
Helper method that creates a new org.jetty.webapp.WebAppContext and
registers it as an OSGi service.
|
static void |
registerWebapplication(org.osgi.framework.Bundle contributor,
String webappFolderPath,
String contextPath,
Dictionary<String,String> dic)
Helper method that creates a new org.jetty.webapp.WebAppContext and
registers it as an OSGi service.
|
void |
start(org.osgi.framework.BundleContext context)
Setup a new jetty Server, registers it as a service.
|
void |
stop(org.osgi.framework.BundleContext context)
Stop the activator.
|
static void |
unregister(String contextPath) |
public static JettyBootstrapActivator getInstance()
public void start(org.osgi.framework.BundleContext context) throws Exception
start
in interface org.osgi.framework.BundleActivator
context
- Exception
public void stop(org.osgi.framework.BundleContext context) throws Exception
stop
in interface org.osgi.framework.BundleActivator
Exception
BundleActivator.stop(org.osgi.framework.BundleContext)
public static void registerWebapplication(org.osgi.framework.Bundle contributor, String webappFolderPath, String contextPath) throws Exception
JettyContextHandlerServiceTracker
will do the actual deployment.contributor
- The bundlewebappFolderPath
- The path to the root of the webapp. Must be a
path relative to bundle; either an absolute path.contextPath
- The context path. Must start with "/"Exception
public static void registerWebapplication(org.osgi.framework.Bundle contributor, String webappFolderPath, String contextPath, Dictionary<String,String> dic) throws Exception
JettyContextHandlerServiceTracker
will do the actual deployment.contributor
- The bundlewebappFolderPath
- The path to the root of the webapp. Must be a
path relative to bundle; either an absolute path.contextPath
- The context path. Must start with "/"dic
- TODO: parameter descriptionException
public static void registerContext(org.osgi.framework.Bundle contributor, String contextFilePath) throws Exception
JettyContextHandlerServiceTracker
will do the actual deployment.contributor
- The bundle that registers a new contextcontextFilePath
- The path to the file inside the bundle that
defines the context.Exception
public static void registerContext(org.osgi.framework.Bundle contributor, String contextFilePath, Dictionary<String,String> dic) throws Exception
JettyContextHandlerServiceTracker
will do the actual deployment.contributor
- The bundle that registers a new contextcontextFilePath
- The path to the file inside the bundle that
defines the context.dic
- TODO: parameter descriptionException
public static void unregister(String contextPath)
public static org.osgi.framework.BundleContext getBundleContext()
Copyright © 1995-2015 Mort Bay Consulting. All Rights Reserved.