org.jboss.webbeans.servlet
Class ServletLifecycle

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

public class ServletLifecycle
extends java.lang.Object

Implementation of the Web Beans 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
protected  BeanStore restoreSessionContext(javax.servlet.http.HttpServletRequest request)
          Restore the session from the underlying session object.
protected  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

Parameters:
session - The HTTP session

restoreSessionContext

protected 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 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 © 2011. All Rights Reserved.