Class BridgeServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- org.adempiere.eclipse.equinox.http.servlet.BridgeServlet
-
- All Implemented Interfaces:
Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig
- Direct Known Subclasses:
BridgeFilter
public class BridgeServlet extends javax.servlet.http.HttpServletAdapted from org.eclipse.equinox.servletbridge.BridgeServlet The BridgeServlet provides a means to bridge the servlet and OSGi runtimes. This class has 3 main responsibilities: 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 Description BridgeServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()destroy() is called by the Servlet Container and used to first stop and then destroy the framework.voidinit()init() is called by the Servlet Container and used to instantiate the frameworkLauncher which MUST be an instance of FrameworkLauncher.protected voidprocess(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, javax.servlet.FilterChain chain)Search from OSGi registry the servlet, ressources... to executed according the path of the HTTP request.protected voidservice(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-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
-
-
-
-
Method Detail
-
init
public void init() throws javax.servlet.ServletExceptioninit() 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:
initin classjavax.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:
destroyin interfacejavax.servlet.Servlet- Overrides:
destroyin classjavax.servlet.GenericServlet
-
service
protected void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOExceptionservice 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:
servicein classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-
process
protected void process(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, javax.servlet.FilterChain chain) throws javax.servlet.ServletException, IOExceptionSearch from OSGi registry the servlet, ressources... to executed according the path of the HTTP request. If no service are founded :- if
FilterChainis not null :FilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse)is called. - otherwise throw 404 error.
- Parameters:
req-resp-chain-- Throws:
javax.servlet.ServletExceptionIOException
- if
-
-