Save This Page
Home » bsf-src-2.4.0 » org.apache.bsf.engines.activescript » [javadoc | source]
org.apache.bsf.engines.activescript
public class: ActiveScriptEngine [javadoc | source]
java.lang.Object
   org.apache.bsf.util.BSFEngineImpl
      org.apache.bsf.engines.activescript.ActiveScriptEngine

All Implemented Interfaces:
    JavaBeanAddEventListener, BSFEngine

This is the interface to active scripting engines from the Bean Scripting Framework. This code uses John Ponzo's IBM Active Scripting Toolkit to tie in active scripting engines to BSF. This class implements Runnable to create a thread. This thread is to exclusively access the scripting engine. All methods from this class to the engines is proxied over to the engine thread for execution. Why? Because, MS engines are implemented to only be accessed from ONE thread.
Nested Class Summary:
class  ActiveScriptEngine.ArrayInfo   
Field Summary
static  BSFException dllLoadException     
static final  String libName     
static final  String LANG_VBSCRIPT     
static final  String LANG_PERLSCRIPT     
static final  String LANG_JSCRIPT     
 byte[] css     
 BSFManager bsfmgr     
protected  String lang     
Fields inherited from org.apache.bsf.util.BSFEngineImpl:
mgr,  lang,  declaredBeans,  classPath,  tempDir,  classLoader
Method from org.apache.bsf.engines.activescript.ActiveScriptEngine Summary:
addEventListener,   bindMember,   call,   callMethod,   callMethodViaBSF,   createBSFException,   createBean,   declareBean,   eval,   exec,   finalize,   initialize,   isCaseSensitive,   isJScript,   isPerlScript,   isVBScript,   lookupBean,   nativeIdispatchAddRef,   nativeIdispatchDeleteRef,   setEvalRet,   terminate,   undeclareBean
Methods from org.apache.bsf.util.BSFEngineImpl:
apply,   compileApply,   compileExpr,   compileScript,   declareBean,   exec,   iexec,   initialize,   propertyChange,   terminate,   undeclareBean
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.bsf.engines.activescript.ActiveScriptEngine Detail:
 public  void addEventListener(Object bean,
    String event,
    String filter,
    String script) throws BSFException 
    add an event listener
 public final int bindMember(Object target,
    String name,
    short bindType) throws Exception 
    Binds a method to an integer so it can be later referenced to invoke the method via callMethod.
 public Object call(Object object,
    String method,
    Object[] args) throws BSFException 
    Return an object from an extension.
 public final Object callMethod(Object bean,
    int methodID,
    Object[] args) throws Exception 
    Invokes the method assocaited with methodID on the bean with parameters in the array args.
 final Object callMethodViaBSF(Object[] args) throws BSFException 
 public static final Throwable createBSFException(int reason,
    String msg,
    Throwable t) 
 public final Object createBean(Object[] args) throws BSFException 
    createBean
 public final  void declareBean(BSFDeclaredBean bean) throws BSFException 
    Declare a bean after the engine has been started. Declared beans are beans that are named and which the engine must make available to the scripts it runs in the most first class way possible.
 public Object eval(String source,
    int lineNo,
    int columnNo,
    Object oscript) throws BSFException 
    This is used by an application to evaluate a string containing some expression. ActiveScript engines don't return anything .. so the return value is awlays null.
 public  void exec(String source,
    int lineNo,
    int columnNo,
    Object script) throws BSFException 
    This is used by an application to execute a string containing a script to execute. ActiveScript engines don't return anything .. so the return value is awlays null.
 protected  void finalize() throws Throwable 
 public  void initialize(BSFManager mgr,
    String language,
    Vector declaredBeans) throws BSFException 
 protected final boolean isCaseSensitive() 
 protected final boolean isJScript() 
 protected final boolean isPerlScript() 
 protected final boolean isVBScript() 
 public final Object lookupBean(String name) 
    lookupBean
 static native  void nativeIdispatchAddRef(byte[] IdispatchInterface) throws BSFException
 static native  void nativeIdispatchDeleteRef(byte[] IdispatchInterface) throws BSFException
 public final  void setEvalRet(Object ret) 
 public synchronized  void terminate() 
 public  void undeclareBean(BSFDeclaredBean bean) throws BSFException 
    Undeclare a previously declared bean.