Class RhinoEngine


  • public abstract class RhinoEngine
    extends java.lang.Object
    A class to access instances of the Rhino JavaScript engine.
    • Constructor Detail

      • RhinoEngine

        public RhinoEngine()
    • Method Detail

      • getThreadLocalRuntimeContext

        public static Context getThreadLocalRuntimeContext()
        Creates a Javascript Context which is thread local. It also:
        • disables Rhino's LiveConnect feature,
        • sets the desired JavaScript language.
      • destroy

        public static void destroy()
        Destroys the Rhino engine.
      • getTopLevelScope

        public static Scriptable getTopLevelScope()
        Gets this engine's top level scope.
        Returns:
        the Rhino engine's top level scope object.
      • setTopLevelScope

        public static void setTopLevelScope​(ScriptableObject scriptableObject)
        Sets the top level scope from the given global object.
        Parameters:
        scriptableObject - a scriptable object. This object is registered as a global object, with all other JavaScript global objects.