JSF-Spring

de.mindmatters.faces.spring.context.servlet
Class FacesContextLoader

java.lang.Object
  extended by de.mindmatters.faces.spring.context.servlet.FacesContextLoader

public final class FacesContextLoader
extends java.lang.Object

Performs the actual initialization work for a FacesContext which contains all of the per-request state information. Called by FacesContextFilter and FacesDispatcherServlet.

Author:
Andreas Kuhrwahl
See Also:
FacesContextFilter, FacesDispatcherServlet

Method Summary
static FacesContextLoader getCurrentInstance()
           
 FacesContext initFacesContext(javax.servlet.ServletContext servletContext, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
          Create (if needed) and return a FacesContext instance that is initialized for the processing of the specified request and response objects.
 void releaseFacesContext(FacesContext context)
          Release any resources associated with the given FacesContext instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCurrentInstance

public static FacesContextLoader getCurrentInstance()
Returns:
The singleton instance of FacesContextLoader.

initFacesContext

public FacesContext initFacesContext(javax.servlet.ServletContext servletContext,
                                     javax.servlet.ServletRequest request,
                                     javax.servlet.ServletResponse response)
                              throws javax.servlet.ServletException
Create (if needed) and return a FacesContext instance that is initialized for the processing of the specified request and response objects.

Parameters:
servletContext - the ServletContext that is associated with this web
request - the ServletRequest that is to be processed
response - the ServletResponse that is to be processed
Returns:
The FacesContext instance
Throws:
javax.servlet.ServletException - if a FacesContext cannot be constructed for the specified parameters
See Also:
FacesContextFactory.getFacesContext(Object, Object, Object, Lifecycle)

releaseFacesContext

public void releaseFacesContext(FacesContext context)
Release any resources associated with the given FacesContext instance.

Parameters:
context - the FacesContext which contains per-request state information
See Also:
FacesContext.release()

JSF-Spring

Copyright © 2006 mindmatters GmbH & Co. KG