play.server
类 ServletWrapper

java.lang.Object
  继承者 javax.servlet.GenericServlet
      继承者 javax.servlet.http.HttpServlet
          继承者 play.server.ServletWrapper
所有已实现的接口:
java.io.Serializable, java.util.EventListener, Servlet, ServletConfig, ServletContextListener

public class ServletWrapper
extends HttpServlet
implements ServletContextListener

Servlet implementation. Thanks to Lee Breisacher.

另请参见:
序列化表格

嵌套类摘要
 class ServletWrapper.ServletInvocation
           
 
字段摘要
static java.lang.String IF_MODIFIED_SINCE
           
static java.lang.String IF_NONE_MATCH
           
static java.lang.String SERVLET_REQ
          Constant for accessing the underlying HttpServletRequest from Play's Request in a Servlet based deployment.
static java.lang.String SERVLET_RES
          Constant for accessing the underlying HttpServletResponse from Play's Request in a Servlet based deployment.
 
构造方法摘要
ServletWrapper()
           
 
方法摘要
 void contextDestroyed(ServletContextEvent e)
           
 void contextInitialized(ServletContextEvent e)
           
 void copyResponse(Http.Request request, Http.Response response, HttpServletRequest servletRequest, HttpServletResponse servletResponse)
           
 void destroy()
           
protected static java.util.Map<java.lang.String,Http.Cookie> getCookies(HttpServletRequest httpServletRequest)
           
protected static java.util.Map<java.lang.String,Http.Header> getHeaders(HttpServletRequest httpServletRequest)
           
static boolean isGreaterThan(ServletContext context, int majorVersion, int minorVersion)
           
static boolean isModified(java.lang.String etag, long last, HttpServletRequest request)
           
static Http.Request parseRequest(HttpServletRequest httpServletRequest)
           
 void serve404(HttpServletRequest servletRequest, HttpServletResponse servletResponse, NotFound e)
           
 void serve500(java.lang.Exception e, HttpServletRequest request, HttpServletResponse response)
           
 void serveStatic(HttpServletResponse servletResponse, HttpServletRequest servletRequest, RenderStatic renderStatic)
           
protected  void service(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)
           
 
从类 javax.servlet.http.HttpServlet 继承的方法
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
 
从类 javax.servlet.GenericServlet 继承的方法
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

IF_MODIFIED_SINCE

public static final java.lang.String IF_MODIFIED_SINCE
另请参见:
常量字段值

IF_NONE_MATCH

public static final java.lang.String IF_NONE_MATCH
另请参见:
常量字段值

SERVLET_REQ

public static final java.lang.String SERVLET_REQ
Constant for accessing the underlying HttpServletRequest from Play's Request in a Servlet based deployment.

Sample usage:

HttpServletRequest req = Request.current().args.get(ServletWrapper.SERVLET_REQ);

另请参见:
常量字段值

SERVLET_RES

public static final java.lang.String SERVLET_RES
Constant for accessing the underlying HttpServletResponse from Play's Request in a Servlet based deployment.

Sample usage:

HttpServletResponse res = Request.current().args.get(ServletWrapper.SERVLET_RES);

另请参见:
常量字段值
构造方法详细信息

ServletWrapper

public ServletWrapper()
方法详细信息

contextInitialized

public void contextInitialized(ServletContextEvent e)
指定者:
接口 ServletContextListener 中的 contextInitialized

contextDestroyed

public void contextDestroyed(ServletContextEvent e)
指定者:
接口 ServletContextListener 中的 contextDestroyed

destroy

public void destroy()
指定者:
接口 Servlet 中的 destroy
覆盖:
GenericServlet 中的 destroy

isGreaterThan

public static boolean isGreaterThan(ServletContext context,
                                    int majorVersion,
                                    int minorVersion)

service

protected void service(HttpServletRequest httpServletRequest,
                       HttpServletResponse httpServletResponse)
                throws ServletException,
                       java.io.IOException
覆盖:
HttpServlet 中的 service
抛出:
ServletException
java.io.IOException

serveStatic

public void serveStatic(HttpServletResponse servletResponse,
                        HttpServletRequest servletRequest,
                        RenderStatic renderStatic)
                 throws java.io.IOException
抛出:
java.io.IOException

isModified

public static boolean isModified(java.lang.String etag,
                                 long last,
                                 HttpServletRequest request)

parseRequest

public static Http.Request parseRequest(HttpServletRequest httpServletRequest)
                                 throws java.lang.Exception
抛出:
java.lang.Exception

getHeaders

protected static java.util.Map<java.lang.String,Http.Header> getHeaders(HttpServletRequest httpServletRequest)

getCookies

protected static java.util.Map<java.lang.String,Http.Cookie> getCookies(HttpServletRequest httpServletRequest)

serve404

public void serve404(HttpServletRequest servletRequest,
                     HttpServletResponse servletResponse,
                     NotFound e)

serve500

public void serve500(java.lang.Exception e,
                     HttpServletRequest request,
                     HttpServletResponse response)

copyResponse

public void copyResponse(Http.Request request,
                         Http.Response response,
                         HttpServletRequest servletRequest,
                         HttpServletResponse servletResponse)
                  throws java.io.IOException
抛出:
java.io.IOException


Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly