Top Description Inners 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.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private WebConfiguration
private boolean
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.

private void
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

configback to summary
private WebConfiguration config
isClientWindowEnabledback to summary
private boolean isClientWindowEnabled
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
postConstructApplicationInitializationback to summary
private void postConstructApplicationInitialization()
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
com.sun.faces.lifecycle back to summary

private Class LifecycleImpl.PostConstructApplicationListener

extends Object
implements SystemEventListener
Class Inheritance
  • java.lang.Object
  • com.sun.faces.lifecycle.LifecycleImpl.PostConstructApplicationListener
All Implemented Interfaces
jakarta.faces.event.SystemEventListener, jakarta.faces.event.FacesListener, java.util.EventListener

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public boolean
isListenerForSource(Object
the source that is inquiring about the appropriateness of sending an event to this listener instance.
source
)

Implements jakarta.faces.event.SystemEventListener.isListenerForSource.

This method must return true if and only if this listener instance is interested in receiving events from the instance referenced by the source parameter.

public void
processEvent(SystemEvent
the SystemEvent instance that is being processed.
event
)

Implements jakarta.faces.event.SystemEventListener.processEvent.

When called, the listener can assume that any guarantees given in the javadoc for the specific SystemEvent subclass are true.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

PostConstructApplicationListenerback to summary
private PostConstructApplicationListener()

Method Detail

isListenerForSourceback to summary
public boolean isListenerForSource(Object source)

Implements jakarta.faces.event.SystemEventListener.isListenerForSource.

Doc from jakarta.faces.event.SystemEventListener.isListenerForSource.

This method must return true if and only if this listener instance is interested in receiving events from the instance referenced by the source parameter.

Parameters
source:Object

the source that is inquiring about the appropriateness of sending an event to this listener instance.

Returns:boolean

the value as specified above

Annotations
@Override
processEventback to summary
public void processEvent(SystemEvent event) throws AbortProcessingException

Implements jakarta.faces.event.SystemEventListener.processEvent.

Doc from jakarta.faces.event.SystemEventListener.processEvent.

When called, the listener can assume that any guarantees given in the javadoc for the specific SystemEvent subclass are true.

Parameters
event:SystemEvent

the SystemEvent instance that is being processed.

Annotations
@Override
Exceptions
AbortProcessingException:
if lifecycle processing should cease for this request.