|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.shale.view.faces.LifecycleListener org.apache.shale.tiger.view.faces.LifecycleListener2
public class LifecycleListener2
Specialized version of
org.apache.shale.view.faces.LifecycleListener
that implements callbacks to methods tagged by appropriate annotations,
rather than requiring the containing classes to implement a particular
interface or extend a particular subclass.
IMPLEMENTATION NOTE: The standard LifecycleListener instance will delegate to methods of this class after performing its own appropriate processing. Therefore, implementation methods must NOT call their superclass counterparts. Doing so will cause any infinite recursion and ultimately a stack overflow error.
$Id: LifecycleListener2.java 489966 2006-12-24 01:43:42Z craigmcc $
Field Summary | |
---|---|
static String |
FACES_CONFIG_CONFIG
Application scope attribute under which a configured FacesConfigConfig bean will be stored, containing
information parsed from the relevant faces-config.xml
resource(s) for this application. |
static String |
SCAN_PACKAGES
Servlet context init parameter which defines which packages to scan for beans. |
Constructor Summary | |
---|---|
LifecycleListener2()
Create a new lifecycle listener. |
Method Summary | |
---|---|
void |
attributeAdded(HttpSessionBindingEvent event)
Respond to a session scope attribute being added. |
void |
attributeAdded(ServletContextAttributeEvent event)
Respond to an application scope attribute being added. |
void |
attributeAdded(ServletRequestAttributeEvent event)
Respond to a request scope attribute being added. |
void |
attributeRemoved(HttpSessionBindingEvent event)
Respond to a session scope attribute being removed. |
void |
attributeRemoved(ServletContextAttributeEvent event)
Respond to an application scope attribute being removed. |
void |
attributeRemoved(ServletRequestAttributeEvent event)
Respond to a request scope attribute being removed. |
void |
attributeReplaced(HttpSessionBindingEvent event)
Respond to a session scope attribute being replaced. |
void |
attributeReplaced(ServletContextAttributeEvent event)
Respond to an application scope attribute being replaced. |
void |
attributeReplaced(ServletRequestAttributeEvent event)
Respond to a request scope attribute being replaced. |
void |
contextDestroyed(ServletContextEvent event)
Respond to a context destroyed event. |
void |
contextInitialized(ServletContextEvent event)
Respond to a context initialized event. |
protected void |
fireApplicationDestroy(Object bean)
Fire a destroy event on an @{link AbstractApplicationBean}. |
protected void |
fireApplicationInit(Object bean)
Fire an init event on an AbstractApplicationBean . |
protected void |
fireRequestDestroy(Object bean)
Fire a destroy event on an @{link AbstractRequestBean}. |
protected void |
fireRequestInit(Object bean)
Fire an init event on an AbstractRequestBean . |
protected void |
fireSessionActivate(Object bean)
Fire an activate event on an @{link AbstractSessionBean}. |
protected void |
fireSessionDestroy(Object bean)
Fire a destroy event on an @{link AbstractSessionBean}. |
protected void |
fireSessionInit(Object bean)
Fire an init event on an AbstractSessionBean . |
protected void |
fireSessionPassivate(Object bean)
Fire an passivate event on an @{link AbstractSessionBean}. |
void |
requestDestroyed(ServletRequestEvent event)
Respond to a request destroyed event. |
void |
requestInitialized(ServletRequestEvent event)
Respond to a request created event. |
void |
sessionCreated(HttpSessionEvent event)
Respond to a session created event. |
void |
sessionDestroyed(HttpSessionEvent event)
Respond to a session destroyed event. |
void |
sessionDidActivate(HttpSessionEvent event)
Respond to a "session did activate" event. |
void |
sessionWillPassivate(HttpSessionEvent event)
Respond to a "session will passivate" event. |
Methods inherited from class org.apache.shale.view.faces.LifecycleListener |
---|
handleException |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String SCAN_PACKAGES
Servlet context init parameter which defines which packages to scan for beans.
public static final String FACES_CONFIG_CONFIG
Application scope attribute under which a configured
FacesConfigConfig
bean will be stored, containing
information parsed from the relevant faces-config.xml
resource(s) for this application.
Constructor Detail |
---|
public LifecycleListener2()
Create a new lifecycle listener.
Method Detail |
---|
public void contextInitialized(ServletContextEvent event)
Respond to a context initialized event. Forcibly replace
the managed bean services that are different when the Tiger
extensions are loaded. Then, process the faces-config.xml
resources for this application in order to record the configuration
of managed beans.
contextInitialized
in interface ServletContextListener
contextInitialized
in class org.apache.shale.view.faces.LifecycleListener
event
- Event to be processedpublic void contextDestroyed(ServletContextEvent event)
Respond to a context destroyed event. Clean up our allocated application scope attributes.
contextDestroyed
in interface ServletContextListener
contextDestroyed
in class org.apache.shale.view.faces.LifecycleListener
event
- Event to be processedpublic void attributeAdded(ServletContextAttributeEvent event)
Respond to an application scope attribute being added. If the
value is an AbstractApplicationBean
, call its
init()
method.
attributeAdded
in interface ServletContextAttributeListener
attributeAdded
in class org.apache.shale.view.faces.LifecycleListener
event
- Event to be processedpublic void attributeReplaced(ServletContextAttributeEvent event)
Respond to an application scope attribute being replaced.
If the old value was an AbstractApplicationBean
, call
its destroy()
method. If the new value is an
AbstractApplicationBean
, call its init()
method.
attributeReplaced
in interface ServletContextAttributeListener
attributeReplaced
in class org.apache.shale.view.faces.LifecycleListener
event
- Event to be processedpublic void attributeRemoved(ServletContextAttributeEvent event)
Respond to an application scope attribute being removed.
If the old value was an AbstractApplicationBean
, call
its destroy()
method.
attributeRemoved
in interface ServletContextAttributeListener
attributeRemoved
in class org.apache.shale.view.faces.LifecycleListener
event
- Event to be processedpublic void sessionCreated(HttpSessionEvent event)
Respond to a session created event. No special processing is required.
sessionCreated
in interface HttpSessionListener
sessionCreated
in class org.apache.shale.view.faces.LifecycleListener
event
- Event to be processedpublic void sessionDestroyed(HttpSessionEvent event)
Respond to a session destroyed event. No special processing is required
sessionDestroyed
in interface HttpSessionListener
sessionDestroyed
in class org.apache.shale.view.faces.LifecycleListener
event
- Event to be processedpublic void sessionWillPassivate(HttpSessionEvent event)
Respond to a "session will passivate" event. Notify all session
scope attributes that are AbstractSessionBean
s.
sessionWillPassivate
in interface HttpSessionActivationListener
sessionWillPassivate
in class org.apache.shale.view.faces.LifecycleListener
event
- Event to be processedpublic void sessionDidActivate(HttpSessionEvent event)
Respond to a "session did activate" event. Notify all session
scope attributes that are AbstractSessionBean
s.
sessionDidActivate
in interface HttpSessionActivationListener
sessionDidActivate
in class org.apache.shale.view.faces.LifecycleListener
event
- Event to be processedpublic void attributeAdded(HttpSessionBindingEvent event)
Respond to a session scope attribute being added. If the
value is an AbstractSessionBean
, call its
init()
method.
attributeAdded
in interface HttpSessionAttributeListener
attributeAdded
in class org.apache.shale.view.faces.LifecycleListener
event
- Event to be processedpublic void attributeReplaced(HttpSessionBindingEvent event)
Respond to a session scope attribute being replaced.
If the old value was an AbstractSessionBean
, call
its destroy()
method. If the new value is an
AbstractSessionBean
, call its init()
method.
attributeReplaced
in interface HttpSessionAttributeListener
attributeReplaced
in class org.apache.shale.view.faces.LifecycleListener
event
- Event to be processedpublic void attributeRemoved(HttpSessionBindingEvent event)
Respond to a session scope attribute being removed.
If the old value was an AbstractSessionBean
, call
its destroy()
method.
attributeRemoved
in interface HttpSessionAttributeListener
attributeRemoved
in class org.apache.shale.view.faces.LifecycleListener
event
- Event to be processedpublic void requestInitialized(ServletRequestEvent event)
Respond to a request created event. If we have accumulated any classes to register with our JSF implementation (but could not initially because it was not initialized before we were), register them now.
requestInitialized
in interface ServletRequestListener
requestInitialized
in class org.apache.shale.view.faces.LifecycleListener
event
- Event to be processedpublic void requestDestroyed(ServletRequestEvent event)
Respond to a request destroyed event. Cause any instance of ViewController or AbstractRequestBean, plus any bean whose class contains the appropriate annotations, to be removed (which will trigger an attribute removed event).
requestDestroyed
in interface ServletRequestListener
requestDestroyed
in class org.apache.shale.view.faces.LifecycleListener
event
- Event to be processedpublic void attributeAdded(ServletRequestAttributeEvent event)
Respond to a request scope attribute being added. If the
value is an AbstractRequestBean
, call its init()
method.
attributeAdded
in interface ServletRequestAttributeListener
attributeAdded
in class org.apache.shale.view.faces.LifecycleListener
event
- Event to be processedpublic void attributeReplaced(ServletRequestAttributeEvent event)
Respond to a request scope attribute being replaced.
If the old value was an AbstractRequestBean
,
call its destroy()
method. If the new value is an
AbstractRequestBean
, call its init()
method.
attributeReplaced
in interface ServletRequestAttributeListener
attributeReplaced
in class org.apache.shale.view.faces.LifecycleListener
event
- Event to be processedpublic void attributeRemoved(ServletRequestAttributeEvent event)
Respond to a request scope attribute being removed.
If the old value was an AbstractRequestBean
,
call its destroy()
method.
attributeRemoved
in interface ServletRequestAttributeListener
attributeRemoved
in class org.apache.shale.view.faces.LifecycleListener
event
- Event to be processedprotected void fireApplicationDestroy(Object bean)
Fire a destroy event on an @{link AbstractApplicationBean}.
fireApplicationDestroy
in class org.apache.shale.view.faces.LifecycleListener
bean
- AbstractApplicationBean
to fire event onprotected void fireApplicationInit(Object bean)
Fire an init event on an AbstractApplicationBean
.
fireApplicationInit
in class org.apache.shale.view.faces.LifecycleListener
bean
- AbstractApplicationBean
to fire event onprotected void fireRequestDestroy(Object bean)
Fire a destroy event on an @{link AbstractRequestBean}.
fireRequestDestroy
in class org.apache.shale.view.faces.LifecycleListener
bean
- AbstractRequestBean
to fire event onprotected void fireRequestInit(Object bean)
Fire an init event on an AbstractRequestBean
.
fireRequestInit
in class org.apache.shale.view.faces.LifecycleListener
bean
- AbstractRequestBean
to fire event onprotected void fireSessionActivate(Object bean)
Fire an activate event on an @{link AbstractSessionBean}.
fireSessionActivate
in class org.apache.shale.view.faces.LifecycleListener
bean
- AbstractSessionBean
to fire event onprotected void fireSessionDestroy(Object bean)
Fire a destroy event on an @{link AbstractSessionBean}.
fireSessionDestroy
in class org.apache.shale.view.faces.LifecycleListener
bean
- AbstractSessionBean
to fire event onprotected void fireSessionInit(Object bean)
Fire an init event on an AbstractSessionBean
.
fireSessionInit
in class org.apache.shale.view.faces.LifecycleListener
bean
- AbstractSessionBean
to fire event onprotected void fireSessionPassivate(Object bean)
Fire an passivate event on an @{link AbstractSessionBean}.
fireSessionPassivate
in class org.apache.shale.view.faces.LifecycleListener
bean
- AbstractSessionBean
to fire event on
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |