com.ca.jcs.processor.script
Class ScriptPoolFactory
java.lang.Object
com.ca.jcs.processor.script.ScriptPoolFactory
- All Implemented Interfaces:
- PoolableObjectFactory
public class ScriptPoolFactory
- extends Object
- implements PoolableObjectFactory
Acts as the factory creating scripting engine instances based on the requested language, script and whether the script is going to be
executed in its entirety or instead have functions defined within it called.
Note that this class ensures that any JavaScript EngineFactory added on the classpath is used in preference to the Rhino
1.6R2 JavaScript implementation bundled with JDK 6, because the bundled implementation:
- doesn't allowing unwrapping of exceptions thrown by a script and
- doesn't support compilation.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EXCEPTION_UNWRAPPER_KEY
public static final String EXCEPTION_UNWRAPPER_KEY
- See Also:
- Constant Field Values
ScriptPoolFactory
public ScriptPoolFactory(String scriptLang,
String script,
boolean invokeFuncs)
makeObject
public Object makeObject()
throws Exception
- Specified by:
makeObject in interface PoolableObjectFactory
- Throws:
Exception
destroyObject
public void destroyObject(Object engineOrCScript)
throws Exception
- Specified by:
destroyObject in interface PoolableObjectFactory
- Throws:
Exception
activateObject
public void activateObject(Object scriptEngine)
throws Exception
- Specified by:
activateObject in interface PoolableObjectFactory
- Throws:
Exception
passivateObject
public void passivateObject(Object scriptEngine)
throws Exception
- Specified by:
passivateObject in interface PoolableObjectFactory
- Throws:
Exception
validateObject
public boolean validateObject(Object scriptEngine)
- Specified by:
validateObject in interface PoolableObjectFactory
Created 2011-07-14 13:27 EST