org.bibeault.jrjournal.ccc
Class ClassConstantMapperEstablisher
java.lang.Object
org.bibeault.jrjournal.ccc.ClassConstantMapperEstablisher
- All Implemented Interfaces:
- java.util.EventListener, javax.servlet.ServletContextListener
- public class ClassConstantMapperEstablisher
- extends java.lang.Object
- implements javax.servlet.ServletContextListener
Context listener that establishes an instance of ClassConstantMapper
in
application scope. The name of the scoped variable is provided by a
context parameter named by the PARAM_CONSTANT_MAPPER_NAME
class constant whose value is
org.bibeault.jrjournal.ccc.ClassConstantMapperEstablisher.classConstantMapperName
An example usage in a deployment descriptor (web.xml) might be:
<context-param>
<param-name>org.bibeault.jrjournal.ccc.ClassConstantMapperEstablisher.classConstantMapperName</param-name>
<param-value>constants</param-value>
</context-param>
<listener>
<listener-class>org.bibeault.jrjournal.ccc.ClassConstantMapperEstablisher</listener-class>
</listener>
- Author:
- Bear Bibeault
Method Summary |
void |
contextDestroyed(javax.servlet.ServletContextEvent servletContextEvent)
|
void |
contextInitialized(javax.servlet.ServletContextEvent servletContextEvent)
Activated by the container when the application is placed into service
in order to establish an instance of ClassConstantMapper in
application context. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PARAM_CONSTANT_MAPPER_NAME
public static final java.lang.String PARAM_CONSTANT_MAPPER_NAME
ClassConstantMapperEstablisher
public ClassConstantMapperEstablisher()
contextInitialized
public void contextInitialized(javax.servlet.ServletContextEvent servletContextEvent)
- Activated by the container when the application is placed into service
in order to establish an instance of
ClassConstantMapper
in
application context.
The scoped variable is created with a name as specified by the
org.bibeault.jrjournal.ccc.ClassConstantMapperEstablisher.classConstantMapperName
context parameter in the deployment descriptor.
- Specified by:
contextInitialized
in interface javax.servlet.ServletContextListener
- Parameters:
servletContextEvent
- the servlet context event
contextDestroyed
public void contextDestroyed(javax.servlet.ServletContextEvent servletContextEvent)
- Specified by:
contextDestroyed
in interface javax.servlet.ServletContextListener