Class JavaScriptEnvironment


  • public class JavaScriptEnvironment
    extends java.lang.Object
    A provider of JavaScriptRunner objects. This implementation uses a single pool of global objects which are re-used, so assumes that non-concurrent pollution of the global environment is not an issue.
    • Constructor Detail

      • JavaScriptEnvironment

        public JavaScriptEnvironment​(RequireLookup requireLookup)
      • JavaScriptEnvironment

        public JavaScriptEnvironment​(RequireLookup requireLookup,
                                     java.lang.ClassLoader classLoader)
    • Method Detail

      • setMaxPoolSize

        public void setMaxPoolSize​(int maxPoolSize)
      • clearCache

        public void clearCache()
        Clears the cache of compiled scripts, as well as the global pool to eliminate each module cache.
      • getRunner

        public JavaScriptRunner getRunner​(java.lang.Thread.UncaughtExceptionHandler uncaughtExceptionHandler,
                                          java.lang.Object logger)
      • recycleDiscardingScriptContext

        public void recycleDiscardingScriptContext​(JavaScriptRunner runner)
      • warmUp

        public void warmUp()
      • shutdown

        public void shutdown()