com.ibm.tivoli.maximo.report.birt.bridge.launcher

Class BridgeServlet

  • java.lang.Object
    • javax.servlet.GenericServlet
      • javax.servlet.http.HttpServlet
        • com.ibm.tivoli.maximo.report.birt.bridge.launcher.BridgeServlet
  • All Implemented Interfaces:
    java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig


    public class BridgeServlet
    extends javax.servlet.http.HttpServlet
    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
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      BridgeServlet() 
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void destroy()
      destroy() is called by the Servlet Container and used to first stop and then destroy the framework.
      void init()
      init() is called by the Servlet Container and used to instantiate the frameworkLauncher which MUST be an instance of FrameworkLauncher.
      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.
      protected void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
      service is called by the Servlet Container and will first determine if the request is a framework control and will otherwise try to delegate to the registered servlet delegate
      static void unregisterServletDelegate(javax.servlet.http.HttpServlet servletDelegate)
      unregisterServletDelegate is the hook method called from inside the OSGi runtime to unregister a delegate.
      • Methods inherited from class javax.servlet.http.HttpServlet

        doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
      • Methods inherited from class javax.servlet.GenericServlet

        getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BridgeServlet

        public BridgeServlet()
    • Method Detail

      • init

        public void init()
                  throws javax.servlet.ServletException
        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.
        Overrides:
        init in class javax.servlet.GenericServlet
        Throws:
        javax.servlet.ServletException
      • destroy

        public void destroy()
        destroy() is called by the Servlet Container and used to first stop and then destroy the framework.
        Specified by:
        destroy in interface javax.servlet.Servlet
        Overrides:
        destroy in class javax.servlet.GenericServlet
      • service

        protected void service(javax.servlet.http.HttpServletRequest req,
                               javax.servlet.http.HttpServletResponse resp)
                        throws javax.servlet.ServletException,
                               java.io.IOException
        service is called by the Servlet Container and will first determine if the request is a framework control and will otherwise try to delegate to the registered servlet delegate
        Overrides:
        service in class javax.servlet.http.HttpServlet
        Throws:
        javax.servlet.ServletException
        java.io.IOException
      • registerServletDelegate

        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 returning.
        Parameters:
        servletDelegate - - the servlet to register for delegation
      • unregisterServletDelegate

        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.
        Parameters:
        servletDelegate - - the servlet to unregister