org.apache.sling.scripting.javascript.internal
Class RhinoJavaScriptEngine

java.lang.Object
  extended by javax.script.AbstractScriptEngine
      extended by org.apache.sling.scripting.api.AbstractSlingScriptEngine
          extended by org.apache.sling.scripting.javascript.internal.RhinoJavaScriptEngine
All Implemented Interfaces:
javax.script.ScriptEngine

public class RhinoJavaScriptEngine
extends AbstractSlingScriptEngine

A ScriptEngine that uses the Rhino interpreter to process Sling requests with server-side javascript.


Field Summary
 
Fields inherited from class javax.script.AbstractScriptEngine
context
 
Fields inherited from interface javax.script.ScriptEngine
ARGV, ENGINE, ENGINE_VERSION, FILENAME, LANGUAGE, LANGUAGE_VERSION, NAME
 
Constructor Summary
RhinoJavaScriptEngine(javax.script.ScriptEngineFactory factory, org.mozilla.javascript.Scriptable rootScope)
           
 
Method Summary
 Object eval(Reader scriptReader, javax.script.ScriptContext scriptContext)
           
 
Methods inherited from class org.apache.sling.scripting.api.AbstractSlingScriptEngine
createBindings, eval, getFactory
 
Methods inherited from class javax.script.AbstractScriptEngine
eval, eval, eval, eval, get, getBindings, getContext, getScriptContext, put, setBindings, setContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RhinoJavaScriptEngine

public RhinoJavaScriptEngine(javax.script.ScriptEngineFactory factory,
                             org.mozilla.javascript.Scriptable rootScope)
Method Detail

eval

public Object eval(Reader scriptReader,
                   javax.script.ScriptContext scriptContext)
            throws javax.script.ScriptException
Throws:
javax.script.ScriptException


Copyright © 2007-2013 The Apache Software Foundation. All Rights Reserved.