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

public abstract Class Phase

extends Object
Class Inheritance
Known Direct Subclasses
com.sun.faces.lifecycle.ProcessValidationsPhase, com.sun.faces.lifecycle.RenderResponsePhase, com.sun.faces.lifecycle.RestoreViewPhase, com.sun.faces.lifecycle.UpdateModelValuesPhase, com.sun.faces.lifecycle.ApplyRequestValuesPhase, com.sun.faces.lifecycle.InvokeApplicationPhase
Imports
java.util.ListIterator, java.util.logging.Level, .Logger, javax.faces.FacesException, javax.faces.context.FacesContext, .Flash, javax.faces.event.ExceptionQueuedEvent, .ExceptionQueuedEventContext, .PhaseEvent, .PhaseId, .PhaseListener, javax.faces.lifecycle.Lifecycle, com.sun.faces.util.FacesLogger, .Timer

A Phase is a single step in the processing of a JavaServer Faces request throughout its entire javax.faces.lifecycle.Lifecycle. Each Phase performs the required transitions on the state information in the FacesContext associated with this request.

Field Summary

Modifier and TypeField and Description
private static final Logger

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
doPhase(FacesContext
the FacesContext for the current request
context
,
Lifecycle
the lifecycle for this request
lifecycle
,
ListIterator<PhaseListener> listeners)

Performs PhaseListener processing and invokes the execute method of the Phase.

public abstract void
execute(FacesContext
FacesContext for the current request being processed
context
)

Perform all state transitions required by the current phase of the request processing javax.faces.lifecycle.Lifecycle for a particular request.

public abstract PhaseId

Returns:

the current javax.faces.lifecycle.Lifecycle Phase identifier.
getId
()

protected void
handleAfterPhase(FacesContext
the FacesContext for the current request
context
,
ListIterator<PhaseListener>
a ListIterator for the PhaseListeners that need to be invoked
listenersIterator
,
PhaseEvent
the event to pass to each of the invoked listeners
event
)

Handle afterPhase PhaseListener events.

protected void
handleBeforePhase(FacesContext
the FacesContext for the current request
context
,
ListIterator<PhaseListener>
a ListIterator for the PhaseListeners that need to be invoked
listenersIterator
,
PhaseEvent
the event to pass to each of the invoked listeners
event
)

Handle beforePhase PhaseListener events.

protected void
protected void
private boolean

Returns:

true if FacesContext.responseComplete() or FacesContext.renderResponse() and the phase is not RENDER_RESPONSE, otherwise return false
shouldSkip
(FacesContext
the FacesContext for the current request
context
)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LOGGERback to summary
private static final Logger LOGGER

Constructor Detail

Phaseback to summary
public Phase()

Method Detail

doPhaseback to summary
public void doPhase(FacesContext context, Lifecycle lifecycle, ListIterator<PhaseListener> listeners)

Performs PhaseListener processing and invokes the execute method of the Phase.

Parameters
context:FacesContext

the FacesContext for the current request

lifecycle:Lifecycle

the lifecycle for this request

executeback to summary
public abstract void execute(FacesContext context) throws FacesException

Perform all state transitions required by the current phase of the request processing javax.faces.lifecycle.Lifecycle for a particular request.

Parameters
context:FacesContext

FacesContext for the current request being processed

Exceptions
FacesException:
if a processing error occurred while executing this phase
getIdback to summary
public abstract PhaseId getId()
Returns:PhaseId

the current javax.faces.lifecycle.Lifecycle Phase identifier.

handleAfterPhaseback to summary
protected void handleAfterPhase(FacesContext context, ListIterator<PhaseListener> listenersIterator, PhaseEvent event)

Handle afterPhase PhaseListener events.

Parameters
context:FacesContext

the FacesContext for the current request

listenersIterator:ListIterator<PhaseListener>

a ListIterator for the PhaseListeners that need to be invoked

event:PhaseEvent

the event to pass to each of the invoked listeners

handleBeforePhaseback to summary
protected void handleBeforePhase(FacesContext context, ListIterator<PhaseListener> listenersIterator, PhaseEvent event)

Handle beforePhase PhaseListener events.

Parameters
context:FacesContext

the FacesContext for the current request

listenersIterator:ListIterator<PhaseListener>

a ListIterator for the PhaseListeners that need to be invoked

event:PhaseEvent

the event to pass to each of the invoked listeners

queueExceptionback to summary
protected void queueException(FacesContext ctx, Throwable t)
queueExceptionback to summary
protected void queueException(FacesContext ctx, Throwable t, String booleanKey)
shouldSkipback to summary
private boolean shouldSkip(FacesContext context)
Parameters
context:FacesContext

the FacesContext for the current request

Returns:boolean

true if FacesContext.responseComplete() or FacesContext.renderResponse() and the phase is not RENDER_RESPONSE, otherwise return false