Top Fields Constructors Methods
javax.faces

pack-priv final Class ServletContextFacesContextFactory

extends FacesContextFactory
Class Inheritance
Imports
java.lang.reflect.Field, java.util.Map, java.util.concurrent.ConcurrentHashMap, java.util.logging.Level, .Logger, javax.faces.context.FacesContext, .FacesContextFactory, javax.faces.lifecycle.Lifecycle, javax.servlet.ServletContext

Field Summary

Modifier and TypeField and Description
private ThreadLocal<FacesContext>
private ConcurrentHashMap<Thread, FacesContext>
private ConcurrentHashMap<FacesContext, ServletContext>
private static final Logger
pack-priv static final String
pack-priv static final String

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public FacesContext
getFacesContext(Object
In servlet environments, the ServletContext that is associated with this web application
context
,
Object
In servlet environments, the ServletRequest that is to be processed
request
,
Object
In servlet environments, the ServletResponse that is to be processed
response
,
Lifecycle
The Lifecycle instance being used to process this request
lifecycle
)

Implements abstract javax.faces.context.FacesContextFactory.getFacesContext.

Create (if needed) and return a FacesContext instance that is initialized for the processing of the specified request and response objects, utilizing the specified Lifecycle instance, for this web application.

pack-priv FacesContext
Inherited from javax.faces.context.FacesContextFactory:
getWrapped

Field Detail

facesContextCurrentInstanceback to summary
private ThreadLocal<FacesContext> facesContextCurrentInstance
facesContextThreadInitContextMapback to summary
private ConcurrentHashMap<Thread, FacesContext> facesContextThreadInitContextMap
initContextServletContextMapback to summary
private ConcurrentHashMap<FacesContext, ServletContext> initContextServletContextMap
LOGGERback to summary
private static final Logger LOGGER
SERVLET_CONTEXT_FINDER_NAMEback to summary
pack-priv static final String SERVLET_CONTEXT_FINDER_NAME
SERVLET_CONTEXT_FINDER_REMOVAL_NAMEback to summary
pack-priv static final String SERVLET_CONTEXT_FINDER_REMOVAL_NAME

Constructor Detail

ServletContextFacesContextFactoryback to summary
pack-priv ServletContextFacesContextFactory()

Method Detail

getFacesContextback to summary
public FacesContext getFacesContext(Object context, Object request, Object response, Lifecycle lifecycle) throws FacesException

Implements abstract javax.faces.context.FacesContextFactory.getFacesContext.

Doc from javax.faces.context.FacesContextFactory.getFacesContext.

Create (if needed) and return a FacesContext instance that is initialized for the processing of the specified request and response objects, utilizing the specified Lifecycle instance, for this web application.

The implementation of this method must ensure that calls to the getCurrentInstance() method of FacesContext, from the same thread that called this method, will return the same FacesContext instance until the release() method is called on that instance.

The implementation must call ExternalContextFactory#getExternalContext to produce the ExternalContext for the FacesContext instance.

The default implementation must call ExceptionHandlerFactory#getExceptionHandler and make it so the return from that method is what gets returned from a call to FacesContext#getExceptionHandler on the returned FacesContext instance.

The default implementation must call javax.faces.lifecycle.ClientWindowFactory#getClientWindow and make it so the return from that method is what gets returned from a call to ExternalContext#getClientWindow() on the returned ExternalContext instance.

Parameters
context:Object

In servlet environments, the ServletContext that is associated with this web application

request:Object

In servlet environments, the ServletRequest that is to be processed

response:Object

In servlet environments, the ServletResponse that is to be processed

lifecycle:Lifecycle

The Lifecycle instance being used to process this request

Returns:FacesContext

the instance of FacesContext.

Annotations
@Override
Exceptions
FacesException:
if a FacesContext cannot be constructed for the specified parameters
getFacesContextWithoutServletContextLookupback to summary
pack-priv FacesContext getFacesContextWithoutServletContextLookup()