Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.webengine.jaxrs.servlet
Class ApplicationServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.nuxeo.ecm.webengine.jaxrs.servlet.ApplicationServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig, ResourceLocator, Reloadable, ManagedServlet
Direct Known Subclasses:
WebEngineServlet

public class ApplicationServlet
extends HttpServlet
implements ManagedServlet, Reloadable, ResourceLocator

JAX-RS servlet based on jersey servlet to provide hot reloading.

Use it as the webengine servlet in web.xml if you want hot reload, otherwise use ServletContainer.

Author:
Bogdan Stefanescu
See Also:
Serialized Form

Constructor Summary
ApplicationServlet()
           
 
Method Summary
 void destroy()
           
 org.osgi.framework.Bundle getBundle()
           
 com.sun.jersey.spi.container.servlet.ServletContainer getContainer()
           
 RenderingEngine getRenderingEngine()
           
 File getResourceFile(String key)
          Get a file resource given a key
 URL getResourceURL(String key)
          Gets an URL resource given a key
 void init(ServletConfig config)
           
 void reload()
           
 void service(HttpServletRequest request, HttpServletResponse response)
           
 void setDescriptor(ServletDescriptor sd)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationServlet

public ApplicationServlet()
Method Detail

setDescriptor

public void setDescriptor(ServletDescriptor sd)
Specified by:
setDescriptor in interface ManagedServlet

init

public void init(ServletConfig config)
          throws ServletException
Specified by:
init in interface Servlet
Overrides:
init in class GenericServlet
Throws:
ServletException

destroy

public void destroy()
Specified by:
destroy in interface Servlet
Overrides:
destroy in class GenericServlet

reload

public void reload()
Specified by:
reload in interface Reloadable

getRenderingEngine

public RenderingEngine getRenderingEngine()

getBundle

public org.osgi.framework.Bundle getBundle()

getContainer

public com.sun.jersey.spi.container.servlet.ServletContainer getContainer()

service

public void service(HttpServletRequest request,
                    HttpServletResponse response)
             throws ServletException,
                    IOException
Overrides:
service in class HttpServlet
Throws:
ServletException
IOException

getResourceFile

public File getResourceFile(String key)
Description copied from interface: ResourceLocator
Get a file resource given a key

Specified by:
getResourceFile in interface ResourceLocator
Returns:

getResourceURL

public URL getResourceURL(String key)
Description copied from interface: ResourceLocator
Gets an URL resource given a key

Specified by:
getResourceURL in interface ResourceLocator
Parameters:
key - the resource key
Returns:
the resource URL or null if no such result was found

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.