|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object php.java.servlet.ContextLoaderListener
public class ContextLoaderListener
Register the PHP/Java Bridge when the web context starts. Used by java_context()->onShutdown(proc). The WEB-INF/web.xml contains a listener attribute:
<listener>
<listener-class>php.java.servlet.ContextLoaderListener</listener-class>
</listener>
Field Summary | |
---|---|
static java.lang.String |
CGI_DIR
|
static java.lang.String |
CONTEXT_LOADER_LISTENER
The key used to store the ContextLoaderListener in the servlet context |
static java.lang.String |
PEAR_DIR
|
static java.lang.String |
WEB_INF_DIR
|
Constructor Summary | |
---|---|
ContextLoaderListener()
|
Method Summary | |
---|---|
boolean |
canStartFCGI()
Used for debugging only. |
void |
contextDestroyed(javax.servlet.ServletContextEvent event)
|
void |
contextInitialized(javax.servlet.ServletContextEvent event)
|
IFCGIProcess |
createFCGIProcess(java.lang.String[] args,
boolean includeJava,
java.io.File home,
java.util.Map env)
Create a FastCGI Process |
void |
destroyCloseables(javax.servlet.ServletContext ctx)
Only for internal use |
java.lang.String |
getCgiDir()
The full path to the pear dir. |
FCGIConnectionFactory |
getChannelName()
|
java.util.List |
getCloseables()
|
FCGIConnectionPool |
getConnectionPool()
|
static ContextLoaderListener |
getContextLoaderListener(javax.servlet.ServletContext ctx)
|
ContextServer |
getContextServer()
|
java.util.HashMap |
getEnvironment()
Get the process environment map used for PHP. |
ILogger |
getLogger()
|
java.lang.String |
getPearDir()
The full path to the pear dir. |
java.lang.String |
getPhp()
Get the path to the PHP binary. |
java.lang.String |
getPhpConnectionPoolSize()
Get the connection pool size, usually FCGIUtil#PHP_FCGI_CONNECTION_POOL_SIZE |
boolean |
getPhpIncludeJava()
Get the value of the php_include_java option from the WEB-INF/web.xml. |
java.lang.String |
getPhpMaxRequests()
Get the max requests value, usually FCGIUtil.PHP_FCGI_MAX_REQUESTS |
ThreadPool |
getThreadPool()
|
java.lang.String |
getWebInfDir()
The full path to the web-inf dir. |
void |
log(java.lang.String msg)
Log message through preferred log mechanism, for example servlet.log() |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PEAR_DIR
public static final java.lang.String CGI_DIR
public static final java.lang.String WEB_INF_DIR
public static final java.lang.String CONTEXT_LOADER_LISTENER
Constructor Detail |
---|
public ContextLoaderListener()
Method Detail |
---|
public void destroyCloseables(javax.servlet.ServletContext ctx)
ctx
- The servlet contextpublic void contextDestroyed(javax.servlet.ServletContextEvent event)
contextDestroyed
in interface javax.servlet.ServletContextListener
public void contextInitialized(javax.servlet.ServletContextEvent event)
contextInitialized
in interface javax.servlet.ServletContextListener
public ThreadPool getThreadPool()
public ContextServer getContextServer()
public ILogger getLogger()
public FCGIConnectionFactory getChannelName()
public java.util.List getCloseables()
public FCGIConnectionPool getConnectionPool()
public static ContextLoaderListener getContextLoaderListener(javax.servlet.ServletContext ctx)
public IFCGIProcess createFCGIProcess(java.lang.String[] args, boolean includeJava, java.io.File home, java.util.Map env) throws java.io.IOException
createFCGIProcess
in interface IFCGIProcessFactory
args
- The PHP argumentsincludeJava
- automatically include Java.inc in each scripthome
- The PHP home dir or nullenv
- The process environment
java.io.IOException
public java.lang.String getPhpConnectionPoolSize()
getPhpConnectionPoolSize
in interface IFCGIProcessFactory
public java.lang.String getPhpMaxRequests()
FCGIUtil.PHP_FCGI_MAX_REQUESTS
getPhpMaxRequests
in interface IFCGIProcessFactory
public java.lang.String getPhp()
getPhp
in interface IFCGIProcessFactory
public boolean getPhpIncludeJava()
getPhpIncludeJava
in interface IFCGIProcessFactory
public java.util.HashMap getEnvironment()
getEnvironment
in interface IFCGIProcessFactory
public boolean canStartFCGI()
canStartFCGI
in interface IFCGIProcessFactory
public java.lang.String getCgiDir()
getCgiDir
in interface IFCGIProcessFactory
public java.lang.String getPearDir()
getPearDir
in interface IFCGIProcessFactory
public java.lang.String getWebInfDir()
getWebInfDir
in interface IFCGIProcessFactory
public void log(java.lang.String msg)
log
in interface IFCGIProcessFactory
msg
- The message to log
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |