Class SecureScriptContextFactory
- java.lang.Object
-
- org.mozilla.javascript.ContextFactory
-
- org.flowable.scripting.secure.impl.SecureScriptContextFactory
-
public class SecureScriptContextFactory extends org.mozilla.javascript.ContextFactory- Author:
- Joram Barrez
-
-
Field Summary
Fields Modifier and Type Field Description protected SecureScriptClassShutterclassShutterprotected booleanenableAccessToBeansprotected longmaxMemoryUsedprotected longmaxScriptExecutionTimeprotected intmaxStackDepthprotected intobserveInstructionCountprotected intoptimizationLevelprotected SecureScriptThreadMxBeanWrapperthreadMxBeanWrapper
-
Constructor Summary
Constructors Constructor Description SecureScriptContextFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ObjectdoTopCall(org.mozilla.javascript.Callable callable, org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable scope, org.mozilla.javascript.Scriptable thisObj, Object[] args)SecureScriptClassShuttergetClassShutter()longgetMaxMemoryUsed()longgetMaxScriptExecutionTime()intgetMaxStackDepth()intgetObserveInstructionCount()intgetOptimizationLevel()booleanisEnableAccessToBeans()protected org.mozilla.javascript.ContextmakeContext()protected voidobserveInstructionCount(org.mozilla.javascript.Context cx, int instructionCount)voidsetClassShutter(SecureScriptClassShutter classShutter)voidsetEnableAccessToBeans(boolean enableAccessToBeans)voidsetMaxMemoryUsed(long maxMemoryUsed)voidsetMaxScriptExecutionTime(long maxScriptExecutionTime)voidsetMaxStackDepth(int maxStackDepth)voidsetObserveInstructionCount(int observeInstructionCount)voidsetOptimizationLevel(int optimizationLevel)-
Methods inherited from class org.mozilla.javascript.ContextFactory
addListener, call, checkNotSealed, createClassLoader, enter, enterContext, enterContext, exit, getApplicationClassLoader, getE4xImplementationFactory, getGlobal, getGlobalSetter, hasExplicitGlobal, hasFeature, initApplicationClassLoader, initGlobal, isSealed, onContextCreated, onContextReleased, removeListener, seal
-
-
-
-
Field Detail
-
classShutter
protected SecureScriptClassShutter classShutter
-
observeInstructionCount
protected int observeInstructionCount
-
maxScriptExecutionTime
protected long maxScriptExecutionTime
-
maxMemoryUsed
protected long maxMemoryUsed
-
maxStackDepth
protected int maxStackDepth
-
optimizationLevel
protected int optimizationLevel
-
threadMxBeanWrapper
protected SecureScriptThreadMxBeanWrapper threadMxBeanWrapper
-
enableAccessToBeans
protected boolean enableAccessToBeans
-
-
Method Detail
-
makeContext
protected org.mozilla.javascript.Context makeContext()
- Overrides:
makeContextin classorg.mozilla.javascript.ContextFactory
-
observeInstructionCount
protected void observeInstructionCount(org.mozilla.javascript.Context cx, int instructionCount)- Overrides:
observeInstructionCountin classorg.mozilla.javascript.ContextFactory
-
doTopCall
protected Object doTopCall(org.mozilla.javascript.Callable callable, org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable scope, org.mozilla.javascript.Scriptable thisObj, Object[] args)
- Overrides:
doTopCallin classorg.mozilla.javascript.ContextFactory
-
getOptimizationLevel
public int getOptimizationLevel()
-
setOptimizationLevel
public void setOptimizationLevel(int optimizationLevel)
-
getClassShutter
public SecureScriptClassShutter getClassShutter()
-
setClassShutter
public void setClassShutter(SecureScriptClassShutter classShutter)
-
getObserveInstructionCount
public int getObserveInstructionCount()
-
setObserveInstructionCount
public void setObserveInstructionCount(int observeInstructionCount)
-
getMaxScriptExecutionTime
public long getMaxScriptExecutionTime()
-
setMaxScriptExecutionTime
public void setMaxScriptExecutionTime(long maxScriptExecutionTime)
-
getMaxMemoryUsed
public long getMaxMemoryUsed()
-
setMaxMemoryUsed
public void setMaxMemoryUsed(long maxMemoryUsed)
-
getMaxStackDepth
public int getMaxStackDepth()
-
setMaxStackDepth
public void setMaxStackDepth(int maxStackDepth)
-
isEnableAccessToBeans
public boolean isEnableAccessToBeans()
-
setEnableAccessToBeans
public void setEnableAccessToBeans(boolean enableAccessToBeans)
-
-