org.jboss.weld.jsf
Class WeldPhaseListener

java.lang.Object
  extended by org.jboss.weld.jsf.WeldPhaseListener
All Implemented Interfaces:
java.io.Serializable, java.util.EventListener, javax.faces.event.PhaseListener

public class WeldPhaseListener
extends java.lang.Object
implements javax.faces.event.PhaseListener

A JSF phase listener that initializes aspects of Weld in a more fine-grained, integrated manner than what is possible with a servlet filter. This phase listener works in conjunction with other hooks and callbacks registered with the JSF runtime to help manage the Weld lifecycle.

It's expected that over time, this phase listener may take on more work, but for now the work is focused soley on conversation management. The phase listener restores the long-running conversation if the conversation id token is detected in the request, activates the conversation context in either case (long-running or transient), and finally passivates the conversation after the response has been committed.

Author:
Nicklas Karlsson, Dan Allen
See Also:
Serialized Form

Constructor Summary
WeldPhaseListener()
           
 
Method Summary
 void afterPhase(javax.faces.event.PhaseEvent phaseEvent)
          Execute after every phase in the JSF life cycle.
 void beforePhase(javax.faces.event.PhaseEvent phaseEvent)
          Execute before every phase in the JSF life cycle.
 javax.faces.event.PhaseId getPhaseId()
          The phase id for which this phase listener is active.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WeldPhaseListener

public WeldPhaseListener()
Method Detail

beforePhase

public void beforePhase(javax.faces.event.PhaseEvent phaseEvent)
Execute before every phase in the JSF life cycle. The order this phase listener executes in relation to other phase listeners is determined by the ordering of the faces-config.xml descriptors. This phase listener should take precedence over extensions.

Specified by:
beforePhase in interface javax.faces.event.PhaseListener
Parameters:
phaseEvent - The phase event

afterPhase

public void afterPhase(javax.faces.event.PhaseEvent phaseEvent)
Execute after every phase in the JSF life cycle. The order this phase listener executes in relation to other phase listeners is determined by the ordering of the faces-config.xml descriptors. This phase listener should take precedence over extensions.

Specified by:
afterPhase in interface javax.faces.event.PhaseListener
Parameters:
phaseEvent - The phase event

getPhaseId

public javax.faces.event.PhaseId getPhaseId()
The phase id for which this phase listener is active. This phase listener observes all JSF life-cycle phases.

Specified by:
getPhaseId in interface javax.faces.event.PhaseListener


Copyright © 2008-2009 Seam Framework. All Rights Reserved.