org.apache.jasper.compiler
Class JspRuntimeContext
java.lang.Object
org.apache.jasper.compiler.JspRuntimeContext
- Runnable
public final class JspRuntimeContext
extends java.lang.Object
implements Runnable
Class for tracking JSP compile time file dependencies when the
&060;%@include file="..."%&062; directive is used.
A background thread periodically checks the files a JSP page
is dependent upon. If a dpendent file changes the JSP page
which included it is recompiled.
Only used if a web application context is a directory.
Version:
- Glenn L. Nielsen
void | addWrapper(String jspUri, JspServletWrapper jsw) - Add a new JspServletWrapper.
|
void | destroy() - Process a "destory" event for this web application context.
|
String | getClassPath() - The classpath that is passed off to the Java compiler.
|
CodeSource | getCodeSource() - Get the SecurityManager Policy CodeSource for this web
applicaiton context.
|
int | getJspCount() - Returns the number of JSPs for which JspServletWrappers exist, i.e.,
the number of JSPs that have been loaded into the webapp.
|
int | getJspReloadCount() - Gets the current value of the JSP reload counter.
|
URLClassLoader | getParentClassLoader() - Get the parent URLClassLoader.
|
PermissionCollection | getPermissionCollection() - Get the SecurityManager PermissionCollection for this
web application context.
|
JspServletWrapper | getWrapper(String jspUri) - Get an already existing JspServletWrapper.
|
void | incrementJspReloadCount() - Increments the JSP reload counter.
|
void | removeWrapper(String jspUri) - Remove a JspServletWrapper.
|
void | run() - The background thread that checks for changes to files
included by a JSP and flags that a recompile is required.
|
void | setJspReloadCount(int count) - Resets the JSP reload counter.
|
protected void | threadSleep() - Sleep for the duration specified by the
checkInterval
property.
|
protected void | threadStart() - Start the background thread that will periodically check for
changes to compile time included files in a JSP.
|
protected void | threadStop() - Stop the background thread that is periodically checking for
changes to compile time included files in a JSP.
|
JspRuntimeContext
public JspRuntimeContext(ServletContext context,
Options options)
Create a JspRuntimeContext for a web application context.
Loads in any previously generated dependencies from file.
context
- ServletContext for web application
addWrapper
public void addWrapper(String jspUri,
JspServletWrapper jsw)
Add a new JspServletWrapper.
jspUri
- JSP URIjsw
- Servlet wrapper for JSP
destroy
public void destroy()
Process a "destory" event for this web application context.
getClassPath
public String getClassPath()
The classpath that is passed off to the Java compiler.
getCodeSource
public CodeSource getCodeSource()
Get the SecurityManager Policy CodeSource for this web
applicaiton context.
- CodeSource for JSP
getJspCount
public int getJspCount()
Returns the number of JSPs for which JspServletWrappers exist, i.e.,
the number of JSPs that have been loaded into the webapp.
- The number of JSPs that have been loaded into the webapp
getJspReloadCount
public int getJspReloadCount()
Gets the current value of the JSP reload counter.
- The current value of the JSP reload counter
getParentClassLoader
public URLClassLoader getParentClassLoader()
Get the parent URLClassLoader.
- URLClassLoader parent
getPermissionCollection
public PermissionCollection getPermissionCollection()
Get the SecurityManager PermissionCollection for this
web application context.
- PermissionCollection permissions
getWrapper
public JspServletWrapper getWrapper(String jspUri)
Get an already existing JspServletWrapper.
jspUri
- JSP URI
- JspServletWrapper for JSP
incrementJspReloadCount
public void incrementJspReloadCount()
Increments the JSP reload counter.
removeWrapper
public void removeWrapper(String jspUri)
Remove a JspServletWrapper.
jspUri
- JSP URI of JspServletWrapper to remove
run
public void run()
The background thread that checks for changes to files
included by a JSP and flags that a recompile is required.
setJspReloadCount
public void setJspReloadCount(int count)
Resets the JSP reload counter.
count
- Value to which to reset the JSP reload counter
threadSleep
protected void threadSleep()
Sleep for the duration specified by the checkInterval
property.
threadStart
protected void threadStart()
Start the background thread that will periodically check for
changes to compile time included files in a JSP.
threadStop
protected void threadStop()
Stop the background thread that is periodically checking for
changes to compile time included files in a JSP.
Copyright B) 2000 Apache Software Foundation. All Rights Reserved.