Class ExternalContextFactory

java.lang.Object
jakarta.faces.context.ExternalContextFactory
All Implemented Interfaces:
FacesWrapper<ExternalContextFactory>
Direct Known Subclasses:
ExternalContextFactoryImpl

public abstract class ExternalContextFactory extends Object implements FacesWrapper<ExternalContextFactory>

ExternalContextFactory is a factory object that creates (if needed) and returns new ExternalContext instances, initialized for the processing of the specified request and response objects.

There must be one ExternalContextFactory instance per web application that is utilizing Jakarta Server Faces. This instance can be acquired, in a portable manner, by calling:

 ExternalContextFactory factory = (ExternalContextFactory) FactoryFinder.getFactory(FactoryFinder.EXTERNAL_CONTEXT_FACTORY);
 

Usage: extend this class and push the implementation being wrapped to the constructor and use getWrapped() to access the instance being wrapped.