php.java.script
Class InvocablePhpServletScriptEngine

java.lang.Object
  extended by javax.script.AbstractScriptEngine
      extended by php.java.script.InvocablePhpScriptEngine
          extended by php.java.script.InvocablePhpServletScriptEngine
All Implemented Interfaces:
Invocable, ScriptEngine

public class InvocablePhpServletScriptEngine
extends InvocablePhpScriptEngine


Field Summary
 
Fields inherited from interface javax.script.ScriptEngine
ARGV, ENGINE, ENGINE_VERSION, FILENAME, LANGUAGE, LANGUAGE_VERSION, NAME
 
Constructor Summary
InvocablePhpServletScriptEngine(javax.servlet.Servlet servlet, javax.servlet.ServletContext ctx, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
           
 
Method Summary
 Bindings createBindings()
          Retrieves an uninitailized namespace which can be used as the scope of the ScriptEngine.
 java.lang.Object eval(java.io.Reader reader, ScriptContext context)
          Evaluates a script obtained using the specified reader as the script source and using the namespaces in the specifed ScriptContext.
 java.lang.Object eval(java.lang.String script, ScriptContext context)
          Evaluates a script using the namespaces in the specifed ScriptContext.
 ScriptEngineFactory getFactory()
          Retrieves a ScriptEngineFactory for the class to which describes the underlying ScriptEngine.
 void release()
          Release the continuation
 
Methods inherited from class php.java.script.InvocablePhpScriptEngine
getInterface, getInterface, invoke, invoke, invokeFunction, invokeMethod
 
Methods inherited from class javax.script.AbstractScriptEngine
eval, eval, eval, eval, get, getBindings, getContext, put, setBindings, setContext
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InvocablePhpServletScriptEngine

public InvocablePhpServletScriptEngine(javax.servlet.Servlet servlet,
                                       javax.servlet.ServletContext ctx,
                                       javax.servlet.http.HttpServletRequest req,
                                       javax.servlet.http.HttpServletResponse res)
                                throws java.net.MalformedURLException,
                                       java.net.URISyntaxException
Throws:
java.net.MalformedURLException
java.net.URISyntaxException
Method Detail

release

public void release()
Release the continuation

Overrides:
release in class InvocablePhpScriptEngine

eval

public java.lang.Object eval(java.io.Reader reader,
                             ScriptContext context)
                      throws ScriptException
Description copied from interface: ScriptEngine
Evaluates a script obtained using the specified reader as the script source and using the namespaces in the specifed ScriptContext. Returns null for non-returning scripts

Parameters:
reader - the script source
context - the context contianing different namespace for script evaluation
Returns:
the value of the evaluated script
Throws:
ScriptException - if an error occurs

eval

public java.lang.Object eval(java.lang.String script,
                             ScriptContext context)
                      throws ScriptException
Description copied from interface: ScriptEngine
Evaluates a script using the namespaces in the specifed ScriptContext. Return null for non-returning scripts.

Parameters:
script - the String representation of the script
context - tbe ScriptContext containing namespaces for the script evaluation
Returns:
the value of the evaluated script
Throws:
ScriptException - if an error occurs

getFactory

public ScriptEngineFactory getFactory()
Description copied from interface: ScriptEngine
Retrieves a ScriptEngineFactory for the class to which describes the underlying ScriptEngine.

Returns:
an instance of ScriptEngineFactory which describes the underlying ScriptEngine

createBindings

public Bindings createBindings()
Retrieves an uninitailized namespace which can be used as the scope of the ScriptEngine.

Returns:
an initialzed namespace which can be used to repalce the state of the ScriptEngine