Top Description Fields Constructors Methods
com.sun.faces.lifecycle

public Class LifecycleImpl

extends Lifecycle
Class Inheritance
Imports
java.util.List, java.util.concurrent.CopyOnWriteArrayList, java.util.logging.Level, .Logger, com.sun.faces.config.WebConfiguration, com.sun.faces.util.FacesLogger, .MessageUtils, .Util, jakarta.faces.FacesException, .FactoryFinder, jakarta.faces.application.Application, jakarta.faces.context.ExternalContext, .FacesContext, jakarta.faces.event.AbortProcessingException, .PhaseListener, .PostConstructApplicationEvent, .SystemEvent, .SystemEventListener, jakarta.faces.lifecycle.ClientWindow, .ClientWindowFactory, .Lifecycle

LifecycleImpl is the stock implementation of the standard Lifecycle in the Jakarta Faces RI.

Field Summary

Modifier and TypeField and Description
private List<PhaseListener>
private static Logger
private Phase[]
private Phase

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public void
addPhaseListener(PhaseListener
The PhaseListener to be registered
listener
)

Implements abstract jakarta.faces.lifecycle.Lifecycle.addPhaseListener.

Register a new PhaseListener instance that is interested in being notified before and after the processing for standard phases of the request processing lifecycle.

public void
attachWindow(FacesContext
the FacesContext for this request.
context
)

Overrides jakarta.faces.lifecycle.Lifecycle.attachWindow.

Create or restore the ClientWindow to be used to display the jakarta.faces.component.UIViewRoot for this run through the lifecycle.

private ClientWindow
public void
execute(FacesContext
FacesContext for the request to be processed
context
)

Implements abstract jakarta.faces.lifecycle.Lifecycle.execute.

Execute all of the phases of the request processing lifecycle, up to but not including the Render Response phase, as described in section 2 "Request Processing Lifecycle" of the Jakarta Faces Specification Document, in the specified order.

public PhaseListener[]
getPhaseListeners()

Implements abstract jakarta.faces.lifecycle.Lifecycle.getPhaseListeners.

Return the set of registered PhaseListeners for this Lifecycle instance.

public void
removePhaseListener(PhaseListener
The PhaseListener to be deregistered
listener
)

Implements abstract jakarta.faces.lifecycle.Lifecycle.removePhaseListener.

Deregister an existing PhaseListener instance that is no longer interested in being notified before and after the processing for standard phases of the request processing lifecycle.

public void
render(FacesContext
FacesContext for the request being processed
context
)

Implements abstract jakarta.faces.lifecycle.Lifecycle.render.

Execute the Render Response phase of the request processing lifecycle, unless the responseComplete() method has been called on the FacesContext instance associated with the current request.

Field Detail

listenersback to summary
private List<PhaseListener> listeners
LOGGERback to summary
private static Logger LOGGER
phasesback to summary
private Phase[] phases
responseback to summary
private Phase response

Constructor Detail

LifecycleImplback to summary
public LifecycleImpl()
LifecycleImplback to summary
public LifecycleImpl(FacesContext context)

Method Detail

addPhaseListenerback to summary
public void addPhaseListener(PhaseListener listener)

Implements abstract jakarta.faces.lifecycle.Lifecycle.addPhaseListener.

Doc from jakarta.faces.lifecycle.Lifecycle.addPhaseListener.

Register a new PhaseListener instance that is interested in being notified before and after the processing for standard phases of the request processing lifecycle.

Parameters
listener:PhaseListener

The PhaseListener to be registered

Annotations
@Override
attachWindowback to summary
public void attachWindow(FacesContext context)

Overrides jakarta.faces.lifecycle.Lifecycle.attachWindow.

Doc from jakarta.faces.lifecycle.Lifecycle.attachWindow.

Create or restore the ClientWindow to be used to display the jakarta.faces.component.UIViewRoot for this run through the lifecycle. See the class documentation for ClientWindow for an overview of the feature. If jakarta.faces.context.ExternalContext#getClientWindow() returns null, create a new instance of ClientWindow using the ClientWindowFactory. If the result is non-null, call ClientWindow#decode(jakarta.faces.context.FacesContext) on it. Store the new ClientWindow by calling jakarta.faces.context.ExternalContext#setClientWindow(jakarta.faces.lifecycle.ClientWindow).

Parameters
context:FacesContext

the FacesContext for this request.

Annotations
@Override
createClientWindowback to summary
private ClientWindow createClientWindow(FacesContext context)
executeback to summary
public void execute(FacesContext context) throws FacesException

Implements abstract jakarta.faces.lifecycle.Lifecycle.execute.

Doc from jakarta.faces.lifecycle.Lifecycle.execute.

Execute all of the phases of the request processing lifecycle, up to but not including the Render Response phase, as described in section 2 "Request Processing Lifecycle" of the Jakarta Faces Specification Document, in the specified order. The processing flow can be affected (by the application, by components, or by event listeners) by calls to the renderResponse() or responseComplete() methods of the FacesContext instance associated with the current request.

Parameters
context:FacesContext

FacesContext for the request to be processed

Annotations
@Override
Exceptions
FacesException:
if thrown during the execution of the request processing lifecycle
getPhaseListenersback to summary
public PhaseListener[] getPhaseListeners()

Implements abstract jakarta.faces.lifecycle.Lifecycle.getPhaseListeners.

Doc from jakarta.faces.lifecycle.Lifecycle.getPhaseListeners.

Return the set of registered PhaseListeners for this Lifecycle instance. If there are no registered listeners, a zero-length array is returned.

Returns:PhaseListener[]

the set of registered PhaseListeners

Annotations
@Override
removePhaseListenerback to summary
public void removePhaseListener(PhaseListener listener)

Implements abstract jakarta.faces.lifecycle.Lifecycle.removePhaseListener.

Doc from jakarta.faces.lifecycle.Lifecycle.removePhaseListener.

Deregister an existing PhaseListener instance that is no longer interested in being notified before and after the processing for standard phases of the request processing lifecycle. If no such listener instance has been registered, no action is taken.

Parameters
listener:PhaseListener

The PhaseListener to be deregistered

Annotations
@Override
renderback to summary
public void render(FacesContext context) throws FacesException

Implements abstract jakarta.faces.lifecycle.Lifecycle.render.

Doc from jakarta.faces.lifecycle.Lifecycle.render.

Execute the Render Response phase of the request processing lifecycle, unless the responseComplete() method has been called on the FacesContext instance associated with the current request.

Parameters
context:FacesContext

FacesContext for the request being processed

Annotations
@Override
Exceptions
FacesException:
if an exception is thrown during the execution of the request processing lifecycle