org.apache.tomcat.modules.config
Class PolicyLoader

java.lang.Object
  |
  +--org.apache.tomcat.core.BaseInterceptor
        |
        +--org.apache.tomcat.modules.config.PolicyLoader
Direct Known Subclasses:
PolicyInterceptor

public class PolicyLoader
extends BaseInterceptor

Load the PolicyInterceptor if JDK1.2 is detected and if "sandbox" property of ContextManager is set. This simplifies the configuration of tomcat - we don't need to use special configs for jdk1.1/jdk1.2+ ( the code can auto-detect that ). We use a simple ContextManager property ( that can be set from command line, or via sandbox="true" ). This class acts as a proxy for the PolicyInterceptor.


Fields inherited from class org.apache.tomcat.core.BaseInterceptor
cm, ct, ctx, debug, DECLINED, loghelper, OK
 
Constructor Summary
PolicyLoader()
           
 
Method Summary
 void addInterceptor(ContextManager cm, Context ctx, BaseInterceptor module)
          Hook called when a new interceptor is added.
 java.lang.String getPolicyFile()
           
 java.lang.String getSecurityManagerClass()
           
 void setPolicyFile(java.lang.String pf)
           
 void setSandbox(boolean b)
          Enable/disable the module, independent of command line options
 void setSecurityManagerClass(java.lang.String cls)
           
 
Methods inherited from class org.apache.tomcat.core.BaseInterceptor
addContainer, addContext, addHandler, addSecurityConstraint, afterBody, authenticate, authorize, beforeBody, beforeCommit, contextInit, contextMap, contextShutdown, contextState, engineInit, engineShutdown, engineStart, engineState, engineStop, findSession, getContext, getContextManager, getDebug, getInfo, getLog, getNote, getNote, handleError, log, log, log, log, postReadRequest, postRequest, postService, postServletDestroy, postServletInit, preService, preServletDestroy, preServletInit, registerHooks, reload, removeContainer, removeContext, removeHandler, removeInterceptor, requestMap, sessionState, setContext, setContextManager, setDebug, setInfo, setNote, setNote
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PolicyLoader

public PolicyLoader()
Method Detail

setSecurityManagerClass

public void setSecurityManagerClass(java.lang.String cls)

getSecurityManagerClass

public java.lang.String getSecurityManagerClass()

getPolicyFile

public java.lang.String getPolicyFile()

setPolicyFile

public void setPolicyFile(java.lang.String pf)

setSandbox

public void setSandbox(boolean b)
Enable/disable the module, independent of command line options

addInterceptor

public void addInterceptor(ContextManager cm,
                           Context ctx,
                           BaseInterceptor module)
                    throws TomcatException
Description copied from class: BaseInterceptor
Hook called when a new interceptor is added. All existing modules will be notified of the new added module. This hook will be called before the interceptor is initialized ( using engineInit hook ) An interceptor can add/remove other interceptors or applications, or alter the ordering of hooks, or change/set server properties.
Overrides:
addInterceptor in class BaseInterceptor
Following copied from class: org.apache.tomcat.core.BaseInterceptor
Parameters:
cm - the server
ctx - not null if this is a local interceptor
i - the new added interceptor
Throws:
TomcatException - The module will not be added if any module throws an exception.


Copyright © 2001 Apache Software Foundation. All Rights Reserved.