public class BridgeServlet
The BridgeServlet provides a means to bridge the servlet and OSGi
runtimes. This class has 3 main repsonsibilities:
1) Control the lifecycle of the associated FrameworkLauncher in line with its own lifecycle
2) Provide a servlet "hook" that allows all servlet requests to be delegated to the registered servlet
3) Provide means to manually control the framework lifecycle
public void init()
init() is called by the Servlet Container and used to instantiate the frameworkLauncher which MUST be an instance of FrameworkLauncher.
After instantiating the framework init, deploy, and start are called.
init in class javax.servlet.GenericServlet
public void destroy()
destroy() is called by the Servlet Container and used to first stop and then destroy the framework.
destroy in interface javax.servlet.Servlet
destroy in class javax.servlet.GenericServlet
public static void registerServletDelegate(javax.servlet.http.HttpServlet servletDelegate)
registerServletDelegate is the hook method called from inside the OSGi runtime to register
a servlet for which all future servlet calls will be delegated. If not null and no delegate
is currently registered, init(ServletConfig) will be called on the servletDelegate before
servletDelegate - - the servlet to register for delegation
public static void unregisterServletDelegate(javax.servlet.http.HttpServlet servletDelegate)
unregisterServletDelegate is the hook method called from inside the OSGi runtime to unregister a delegate.
If the servletDelegate matches the current registered delegate destroy() is called on the servletDelegate.
destroy() will not be called until the delegate is finished servicing any previous requests.