Top Inners Fields Constructors Methods
javax.faces

pack-priv final Class CurrentThreadToServletContext

extends Object
Class Inheritance
Imports
java.util.Map, .Set, java.util.concurrent.ConcurrentHashMap, .ConcurrentMap, java.util.concurrent.atomic.AtomicBoolean, java.util.logging.Level, .Logger, javax.faces.context.ExternalContext, .FacesContext

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
pack-priv ConcurrentMap<CurrentThreadToServletContext.FactoryManagerCacheKey, FactoryFinderInstance>
private static final Logger
private AtomicBoolean
private AtomicBoolean
private final ServletContextFacesContextFactory

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private boolean

Returns:

true if the currentKeyrent execution falls into the special initialization case.
detectSpecialInitializationCase
(FacesContext
the currentKeyrent FacesContext for this request
facesContext
)

This method is used to detect the following special initialization case.

pack-priv FactoryFinderInstance
pack-priv FactoryFinderInstance
private FactoryFinderInstance
private ClassLoader
getClassLoader()

Identify and return the class loader that is associated with the calling web application.

pack-priv Object
getFallbackFactory(FactoryFinderInstance brokenFactoryManager, String factoryName)

pack-priv Object
pack-priv void
pack-priv void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

applicationMapback to summary
pack-priv ConcurrentMap<CurrentThreadToServletContext.FactoryManagerCacheKey, FactoryFinderInstance> applicationMap
LOGGERback to summary
private static final Logger LOGGER
logNonNullFacesContextback to summary
private AtomicBoolean logNonNullFacesContext
logNullFacesContextback to summary
private AtomicBoolean logNullFacesContext
servletContextFacesContextFactoryback to summary
private final ServletContextFacesContextFactory servletContextFacesContextFactory

Constructor Detail

CurrentThreadToServletContextback to summary
pack-priv CurrentThreadToServletContext()

Method Detail

detectSpecialInitializationCaseback to summary
private boolean detectSpecialInitializationCase(FacesContext facesContext)

This method is used to detect the following special initialization case. IF no FactoryFinderInstance can be found for key, AND this call to getApplicationFactoryFinderInstance() *does* have a currentKeyrent FacesContext BUT a previous call to getApplicationFactoryFinderInstance *did not* have a currentKeyrent FacesContext

Parameters
facesContext:FacesContext

the currentKeyrent FacesContext for this request

Returns:boolean

true if the currentKeyrent execution falls into the special initialization case.

getApplicationFactoryManagerback to summary
pack-priv FactoryFinderInstance getApplicationFactoryManager()
getApplicationFactoryManagerback to summary
pack-priv FactoryFinderInstance getApplicationFactoryManager(boolean create)
getApplicationFactoryManagerback to summary
private FactoryFinderInstance getApplicationFactoryManager(ClassLoader cl, boolean create)
getClassLoaderback to summary
private ClassLoader getClassLoader() throws FacesException

Identify and return the class loader that is associated with the calling web application.

Exceptions
FacesException:
if the web application class loader cannot be identified
getFallbackFactoryback to summary
pack-priv Object getFallbackFactory(FactoryFinderInstance brokenFactoryManager, String factoryName)
getServletContextForCurrentClassLoaderback to summary
pack-priv Object getServletContextForCurrentClassLoader()
removeApplicationFactoryManagerback to summary
pack-priv void removeApplicationFactoryManager()
resetSpecialInitializationCaseFlagsback to summary
pack-priv void resetSpecialInitializationCaseFlags()
javax.faces back to summary

private final Class CurrentThreadToServletContext.FactoryManagerCacheKey

extends Object
Class Inheritance
  • java.lang.Object
  • javax.faces.CurrentThreadToServletContext.FactoryManagerCacheKey

Field Summary

Modifier and TypeField and Description
private ClassLoader
private Object
private static final String
private Long
private static final String

Constructor Summary

AccessConstructor and Description
pack-priv
private

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.
private ClassLoader
pack-priv ClassLoader
pack-priv Object
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for the object.
private void
private void
private ClassLoader
Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAlltoStringwaitwaitwait

Field Detail

clback to summary
private ClassLoader cl
contextback to summary
private Object context
INIT_TIME_CL_KEYback to summary
private static final String INIT_TIME_CL_KEY
markerback to summary
private Long marker
MARKER_KEYback to summary
private static final String MARKER_KEY

Constructor Detail

FactoryManagerCacheKeyback to summary
pack-priv FactoryManagerCacheKey(FacesContext facesContext, ClassLoader cl, Map<CurrentThreadToServletContext.FactoryManagerCacheKey, FactoryFinderInstance> factoryMap)
FactoryManagerCacheKeyback to summary
private FactoryManagerCacheKey()

Method Detail

equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
obj:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
findMatchConsideringParentClassLoaderback to summary
private ClassLoader findMatchConsideringParentClassLoader(ClassLoader argumentCL, ClassLoader currentKeyCL)
getClassLoaderback to summary
pack-priv ClassLoader getClassLoader()
getContextback to summary
pack-priv Object getContext()
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object.

Annotations
@Override
initFromAppMapback to summary
private void initFromAppMap(ExternalContext extContext, ClassLoader cl)
initFromFactoryMapback to summary
private void initFromFactoryMap(ClassLoader cl, Map<CurrentThreadToServletContext.FactoryManagerCacheKey, FactoryFinderInstance> factoryMap)
resolveToFirstTimeUsedClassLoaderback to summary
private ClassLoader resolveToFirstTimeUsedClassLoader(ClassLoader toResolve, ExternalContext extContext)