javax.faces.lifecycle
Class Lifecycle

java.lang.Object
  extended byjavax.faces.lifecycle.Lifecycle

public abstract class Lifecycle
extends java.lang.Object

Lifecycle manages the processing of the entire lifecycle of a particular JavaServer Faces request. It is responsible for executing all of the phases that have been defined by the JavaServer Faces Specification, in the specified order, unless otherwise directed by activities that occurred during the execution of each phase.

An instance of Lifecycle is created by calling the getLifecycle() method of LifecycleFactory, for a specified lifecycle identifier. Because this instance is shared across multiple simultaneous requests, it must be implemented in a thread-safe manner.


Constructor Summary
Lifecycle()
           
 
Method Summary
abstract  void execute(FacesContext context)
          Execute all of the phases of the request processing lifecycle, as described in the JavaServer Faces Specification, in the specified order.
abstract  ViewHandler getViewHandler()
          Return the ViewHandler instance that will be utilized during the Render Response phase of the request processing lifecycle.
abstract  void setViewHandler(ViewHandler handler)
          Set the ViewHandler instance that will be utilized during the Render Response phase of the request processing lifecycle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Lifecycle

public Lifecycle()
Method Detail

getViewHandler

public abstract ViewHandler getViewHandler()

Return the ViewHandler instance that will be utilized during the Render Response phase of the request processing lifecycle.


setViewHandler

public abstract void setViewHandler(ViewHandler handler)

Set the ViewHandler instance that will be utilized during the Render Response phase of the request processing lifecycle.

Parameters:
handler - The new ViewHandler instance
Throws:
java.lang.IllegalStateException - if this method is called after at least one request has been processed by this Lifecycle instance
java.lang.NullPointerException - if handler is null

execute

public abstract void execute(FacesContext context)
                      throws FacesException

Execute all of the phases of the request processing lifecycle, 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 for the request to be processed
Throws:
FacesException - if thrown during the execution of the request processing lifecycle
java.lang.NullPointerException - if context is null