Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.jasper.compiler
Class JspRuntimeContext

    java.lang.Object
      org.apache.jasper.compiler.JspRuntimeContext

All Implemented Interfaces:
  java.lang.Runnable

public final class JspRuntimeContext
extends java.lang.Object
implements java.lang.Runnable

Class for tracking JSP compile time file dependencies when the <%@include file="..."%> 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:
  $Revision: 1.17 $
Author:
  Glenn L. Nielsen

Constructor Summary
`JspRuntimeContext(javax.servlet.ServletContext context, Options options)` Create a JspRuntimeContext for a web application context.

Method Summary
`void` | `addWrapper(java.lang.String jspUri, JspServletWrapper jsw)` Add a new JspServletWrapper.
`void` | `destroy()` Process a "destory" event for this web application context.
`java.lang.String` | `getClassPath()` The classpath that is passed off to the Java compiler.
`java.security.CodeSource` | `getCodeSource()` Get the SecurityManager Policy CodeSource for this web applicaiton context.
`java.net.URLClassLoader` | `getParentClassLoader()` Get the parent URLClassLoader.
`java.security.PermissionCollection` | `getPermissionCollection()` Get the SecurityManager PermissionCollection for this web application context.
`JspServletWrapper` | `getWrapper(java.lang.String jspUri)` Get an already existing JspServletWrapper.
`void` | `removeWrapper(java.lang.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.
`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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JspRuntimeContext

    public JspRuntimeContext(javax.servlet.ServletContext context,
                             Options options)

  Create a JspRuntimeContext for a web application context. Loads in any previously generated dependencies from file.

Method Detail

### addWrapper

    public void addWrapper(java.lang.String jspUri,
                           JspServletWrapper jsw)

  Add a new JspServletWrapper.

### getWrapper

    public JspServletWrapper getWrapper(java.lang.String jspUri)

  Get an already existing JspServletWrapper.

  Returns:
    JspServletWrapper for JSP

### removeWrapper

    public void removeWrapper(java.lang.String jspUri)

  Remove a JspServletWrapper.

### getCodeSource

    public java.security.CodeSource getCodeSource()

  Get the SecurityManager Policy CodeSource for this web applicaiton context.

  Returns:
    CodeSource for JSP

### getParentClassLoader

    public java.net.URLClassLoader getParentClassLoader()

  Get the parent URLClassLoader.

  Returns:
    URLClassLoader parent

### getPermissionCollection

    public java.security.PermissionCollection getPermissionCollection()

  Get the SecurityManager PermissionCollection for this web application context.

  Returns:
    PermissionCollection permissions

### destroy

    public void destroy()

  Process a "destory" event for this web application context.

### getClassPath

    public java.lang.String getClassPath()

  The classpath that is passed off to the Java compiler.

### threadStart

    protected void threadStart()

  Start the background thread that will periodically check for changes to compile time included files in a JSP.

  Throws:
    `java.lang.IllegalStateException` - if we should not be starting a background thread now

### threadStop

    protected void threadStop()

  Stop the background thread that is periodically checking for changes to compile time included files in a JSP.

### threadSleep

    protected void threadSleep()

  Sleep for the duration specified by the `checkInterval` property.

### run

    public void run()

  The background thread that checks for changes to files included by a JSP and flags that a recompile is required.

  Specified by:
    `run` in interface `java.lang.Runnable`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000 Apache Software Foundation. All Rights Reserved.