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

public Class LifecycleImpl

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

LifecycleImpl is the stock implementation of the standard Lifecycle in the JavaServer 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 javax.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 javax.faces.lifecycle.Lifecycle.attachWindow.

Create or restore the ClientWindow to be used to display the javax.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 javax.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 the JavaServer Faces Specification, in the specified order.

public PhaseListener[]
getPhaseListeners()

Implements abstract javax.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 javax.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 javax.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 javax.faces.lifecycle.Lifecycle.addPhaseListener.

Doc from javax.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 javax.faces.lifecycle.Lifecycle.attachWindow.

Doc from javax.faces.lifecycle.Lifecycle.attachWindow.

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

Doc from javax.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 the JavaServer Faces Specification, 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 javax.faces.lifecycle.Lifecycle.getPhaseListeners.

Doc from javax.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 javax.faces.lifecycle.Lifecycle.removePhaseListener.

Doc from javax.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 javax.faces.lifecycle.Lifecycle.render.

Doc from javax.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
javax.faces.event.SystemEventListener, javax.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 javax.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 javax.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 javax.faces.event.SystemEventListener.isListenerForSource.

Doc from javax.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 javax.faces.event.SystemEventListener.processEvent.

Doc from javax.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.