Top Fields Constructors Methods
javax.faces

pack-priv final Class ServletContextFacesContextFactory

extends FacesContextFactory
Class Inheritance
Imports
java.lang.reflect.Field, java.util.Map.Entry, 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.

Consult the initContextServletContextMap (reflectively obtained from the FacesContext in our ctor).
pack-priv FacesContext
getFacesContextWithoutServletContextLookup()

This method does what FacesContext.getCurrentInstance() did *before* the fix for Bug 20458755.

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()
Annotations
@SuppressWarnings:unchecked

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.

Consult the initContextServletContextMap (reflectively obtained from the FacesContext in our ctor). If it is non-empty, obtain the ServletContext corresponding to the current Thread's context ClassLoader. If found, use the initContextServletContextMap to find the FacesContext corresponding to that ServletContext.

Parameters
context:Object

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

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

request:Object

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

In servlet environments, the ServletRequest that is to be processed

response:Object

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

In servlet environments, the ServletResponse that is to be processed

lifecycle:Lifecycle

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

The Lifecycle instance being used to process this request

Returns:FacesContext

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

the instance of FacesContext.

Annotations
@Override
Exceptions
FacesException:

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

if a FacesContext cannot be constructed for the specified parameters

getFacesContextWithoutServletContextLookupback to summary
pack-priv FacesContext getFacesContextWithoutServletContextLookup()

This method does what FacesContext.getCurrentInstance() did *before* the fix for Bug 20458755.