php.java.servlet
Class ContextLoaderListener

java.lang.Object
  extended by php.java.servlet.ContextLoaderListener
All Implemented Interfaces:
java.util.EventListener, javax.servlet.ServletContextListener

public class ContextLoaderListener
extends java.lang.Object
implements javax.servlet.ServletContextListener

Register a PHP JSR 223 EngineFactory when the web context starts. Used when the web application WEB-INF/web.xml contains a listener attribute:

<listener>   <listener-class>php.java.servlet.ContextLoaderListener</listener-class> </listener>

See Also:
EngineFactory

Field Summary
static java.lang.String CLOSEABLES
          The key used to store the closeables list in the servlet context, must be destroyed before the engines
static java.lang.String ENGINES
          The key used to store the jsr 223 engines list in the servlet context
 
Constructor Summary
ContextLoaderListener()
           
 
Method Summary
 void contextDestroyed(javax.servlet.ServletContextEvent event)
          
 void contextInitialized(javax.servlet.ServletContextEvent event)
          
static void destroyCloseables(javax.servlet.ServletContext ctx)
          Only for internal use
static void destroyScriptEngines(javax.servlet.ServletContext ctx)
          Only for internal use
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLOSEABLES

public static final java.lang.String CLOSEABLES
The key used to store the closeables list in the servlet context, must be destroyed before the engines


ENGINES

public static final java.lang.String ENGINES
The key used to store the jsr 223 engines list in the servlet context

Constructor Detail

ContextLoaderListener

public ContextLoaderListener()
Method Detail

destroyCloseables

public static void destroyCloseables(javax.servlet.ServletContext ctx)
Only for internal use

Parameters:
ctx - The servlet context

destroyScriptEngines

public static void destroyScriptEngines(javax.servlet.ServletContext ctx)
Only for internal use

Parameters:
ctx - The servlet context

contextDestroyed

public void contextDestroyed(javax.servlet.ServletContextEvent event)

Specified by:
contextDestroyed in interface javax.servlet.ServletContextListener

contextInitialized

public void contextInitialized(javax.servlet.ServletContextEvent event)

Specified by:
contextInitialized in interface javax.servlet.ServletContextListener