org.jboss.weld.servlet
Class ServletLifecycle

java.lang.Object
  extended by org.jboss.weld.servlet.ServletLifecycle

public class ServletLifecycle
extends java.lang.Object

Implementation of the Weld lifecycle that can react to servlet events and drives the Session, Conversation and Request (for Servlet requests) lifecycle

Author:
Pete Muir, Nicklas Karlsson

Field Summary
static java.lang.String REQUEST_ATTRIBUTE_NAME
           
 
Constructor Summary
ServletLifecycle(ContextLifecycle lifecycle)
           
 
Method Summary
 void beginRequest(javax.servlet.http.HttpServletRequest request)
          Begins a HTTP request Sets the session into the session context
 void beginSession(javax.servlet.http.HttpSession session)
          Begins a session
 void endRequest(javax.servlet.http.HttpServletRequest request)
          Ends a HTTP request
 void endSession(javax.servlet.http.HttpSession session)
          Ends a session, setting up a mock request if necessary
protected  org.jboss.weld.context.api.BeanStore restoreSessionContext(javax.servlet.http.HttpServletRequest request)
          Restore the session from the underlying session object.
protected  org.jboss.weld.context.api.BeanStore restoreSessionContext(javax.servlet.http.HttpSession session)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REQUEST_ATTRIBUTE_NAME

public static final java.lang.String REQUEST_ATTRIBUTE_NAME
Constructor Detail

ServletLifecycle

public ServletLifecycle(ContextLifecycle lifecycle)
Method Detail

beginSession

public void beginSession(javax.servlet.http.HttpSession session)
Begins a session

Parameters:
session - The HTTP session

endSession

public void endSession(javax.servlet.http.HttpSession session)
Ends a session, setting up a mock request if necessary

Parameters:
session - The HTTP session

restoreSessionContext

protected org.jboss.weld.context.api.BeanStore restoreSessionContext(javax.servlet.http.HttpServletRequest request)
Restore the session from the underlying session object. Also allow the session to be injected by the Session manager

Parameters:
session -
Returns:
the session bean store

restoreSessionContext

protected org.jboss.weld.context.api.BeanStore restoreSessionContext(javax.servlet.http.HttpSession session)

beginRequest

public void beginRequest(javax.servlet.http.HttpServletRequest request)
Begins a HTTP request Sets the session into the session context

Parameters:
request - The request

endRequest

public void endRequest(javax.servlet.http.HttpServletRequest request)
Ends a HTTP request

Parameters:
request - The request


Copyright © 2008-2009 Seam Framework. All Rights Reserved.