Class SecureScriptContextFactory


  • public class SecureScriptContextFactory
    extends org.mozilla.javascript.ContextFactory
    Author:
    Joram Barrez
    • Field Detail

      • observeInstructionCount

        protected int observeInstructionCount
      • maxScriptExecutionTime

        protected long maxScriptExecutionTime
      • maxMemoryUsed

        protected long maxMemoryUsed
      • maxStackDepth

        protected int maxStackDepth
      • optimizationLevel

        protected int optimizationLevel
      • enableAccessToBeans

        protected boolean enableAccessToBeans
    • Constructor Detail

      • SecureScriptContextFactory

        public SecureScriptContextFactory()
    • Method Detail

      • makeContext

        protected org.mozilla.javascript.Context makeContext()
        Overrides:
        makeContext in class org.mozilla.javascript.ContextFactory
      • observeInstructionCount

        protected void observeInstructionCount​(org.mozilla.javascript.Context cx,
                                               int instructionCount)
        Overrides:
        observeInstructionCount in class org.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:
        doTopCall in class org.mozilla.javascript.ContextFactory
      • getOptimizationLevel

        public int getOptimizationLevel()
      • setOptimizationLevel

        public void setOptimizationLevel​(int optimizationLevel)
      • 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)