FacesContextFactory is a
factory object that creates (if needed) and returns new FacesContext instances, initialized for the
processing of the specified request and response objects. Implementations may take advantage of the calls to the
release() method of the allocated FacesContext instances to pool and recycle them, rather than
creating a new instance every time.
There must be one FacesContextFactory instance per web application that is utilizing Jakarta Server
Faces. This instance can be acquired, in a portable manner, by calling:
FacesContextFactory factory = (FacesContextFactory) FactoryFinder.getFactory(FactoryFinder.FACES_CONTEXT_FACTORY);
Usage: extend this class and push the implementation being wrapped to the constructor and use getWrapped to
access the instance being wrapped.
| Modifier and Type | Field and Description |
|---|---|
| private FacesContextFactory |
| Access | Constructor and Description |
|---|---|
| public | |
| public | FacesContextFactory(FacesContextFactory
The implementation being wrapped. wrapped)If this factory has been decorated, the implementation doing the decorating should push the implementation being wrapped to this constructor. |
| Modifier and Type | Method and Description |
|---|---|
| public abstract FacesContext | Returns: the instance ofFacesContext.In Jakarta Servlet environments, the context, Object ServletContext that is associated with this web
applicationIn Jakarta Servlet environments, the request, Object ServletRequest that is to be processedIn Jakarta Servlet environments, the response, Lifecycle ServletResponse that is to be processedThe lifecycle)Lifecycle instance being used to process this request
Create (if needed) and return a |
| public FacesContextFactory | getWrapped()
Implements jakarta. If this factory has been decorated, the implementation doing the decorating may override this method to provide access to the implementation being wrapped. |
| wrapped | back to summary |
|---|---|
| private FacesContextFactory wrapped | |
| FacesContextFactory | back to summary |
|---|---|
| public FacesContextFactory()
Deprecated Use the other constructor taking the implementation being wrapped.
| |
| FacesContextFactory | back to summary |
|---|---|
| public FacesContextFactory(FacesContextFactory wrapped)
If this factory has been decorated, the implementation doing the decorating should push the implementation being
wrapped to this constructor. The
| |
| getFacesContext | back to summary |
|---|---|
| public abstract FacesContext getFacesContext(Object context, Object request, Object response, Lifecycle lifecycle) throws FacesException
Create (if needed) and return a
The implementation of this method must ensure that calls to the
The implementation must call
The default implementation must call
The default implementation must call
| |
| getWrapped | back to summary |
|---|---|
| public FacesContextFactory getWrapped() Implements jakarta. If this factory has been decorated, the implementation doing the decorating may override this method to provide access to the implementation being wrapped.
| |