Package org.alfresco.repo.jscript
Class AlfrescoContextFactory
- java.lang.Object
-
- org.mozilla.javascript.ContextFactory
-
- org.alfresco.repo.jscript.AlfrescoContextFactory
-
public class AlfrescoContextFactory extends org.mozilla.javascript.ContextFactoryCustom factory that allows to apply configured limits during script executions- See Also:
ContextFactory
-
-
Constructor Summary
Constructors Constructor Description AlfrescoContextFactory()
-
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)longgetMaxMemoryUsedInBytes()intgetMaxScriptExecutionSeconds()intgetMaxStackDepth()intgetObserveInstructionCount()intgetOptimizationLevel()protected org.mozilla.javascript.ContextmakeContext()protected voidobserveInstructionCount(org.mozilla.javascript.Context cx, int instructionCount)voidsetMaxMemoryUsedInBytes(long maxMemoryUsedInBytes)voidsetMaxScriptExecutionSeconds(int maxScriptExecutionSeconds)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
-
-
-
-
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)
-
getMaxScriptExecutionSeconds
public int getMaxScriptExecutionSeconds()
-
setMaxScriptExecutionSeconds
public void setMaxScriptExecutionSeconds(int maxScriptExecutionSeconds)
-
getMaxStackDepth
public int getMaxStackDepth()
-
setMaxStackDepth
public void setMaxStackDepth(int maxStackDepth)
-
getMaxMemoryUsedInBytes
public long getMaxMemoryUsedInBytes()
-
setMaxMemoryUsedInBytes
public void setMaxMemoryUsedInBytes(long maxMemoryUsedInBytes)
-
getObserveInstructionCount
public int getObserveInstructionCount()
-
setObserveInstructionCount
public void setObserveInstructionCount(int observeInstructionCount)
-
-