net.contextfw.web.application.internal
Class LifecycleListeners
java.lang.Object
net.contextfw.web.application.internal.LifecycleListeners
- All Implemented Interfaces:
- LifecycleListener
public class LifecycleListeners
- extends Object
- implements LifecycleListener
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LifecycleListeners
@Inject
public LifecycleListeners(com.google.inject.Injector injector,
WebConfiguration configuration)
addListener
public void addListener(LifecycleListener listener)
beforeInitialize
public void beforeInitialize()
- Specified by:
beforeInitialize in interface LifecycleListener
afterInitialize
public void afterInitialize()
- Specified by:
afterInitialize in interface LifecycleListener
beforeUpdate
public boolean beforeUpdate()
- Description copied from interface:
LifecycleListener
This method is useful in two ways. First it can be used to initialize possible
database connections etc.
By default this method should return true, but it can be used to
cancel the client update request by returning false. This can be used
for instance to restrict client from making requests after credentials have been
expired.
In case of false (and also when true) this method can be used to
call methods on components and create updates.
Note that even if false is returned the flow will continue. Only the
client update request is bypassed.
- Specified by:
beforeUpdate in interface LifecycleListener
- Returns:
true if client update can continue, false otherwise
afterUpdate
public void afterUpdate()
- Specified by:
afterUpdate in interface LifecycleListener
onException
public void onException(Exception e)
- Specified by:
onException in interface LifecycleListener
beforeRender
public void beforeRender()
- Specified by:
beforeRender in interface LifecycleListener
afterRender
public void afterRender()
- Specified by:
afterRender in interface LifecycleListener
Copyright © 2011. All Rights Reserved.