Package org.keycloak.scripting
Class InvocableScriptAdapter
- java.lang.Object
- 
- org.keycloak.scripting.InvocableScriptAdapter
 
- 
- All Implemented Interfaces:
- Invocable
 
 public class InvocableScriptAdapter extends Object implements Invocable Wraps aScriptModeland makes itInvocable.- Author:
- Thomas Darimont
 
- 
- 
Constructor SummaryConstructors Constructor Description InvocableScriptAdapter(ScriptModel scriptModel, ScriptEngine scriptEngine)Creates a newInvocableScriptAdapterinstance.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> TgetInterface(Class<T> clazz)<T> TgetInterface(Object thiz, Class<T> clazz)ObjectinvokeFunction(String name, Object... args)ObjectinvokeMethod(Object thiz, String name, Object... args)booleanisDefined(String name)Returns true if theScriptEnginehas a definition with the givenname.
 
- 
- 
- 
Constructor Detail- 
InvocableScriptAdapterpublic InvocableScriptAdapter(ScriptModel scriptModel, ScriptEngine scriptEngine) Creates a newInvocableScriptAdapterinstance.- Parameters:
- scriptModel- must not be null
- scriptEngine- must not be null
 
 
- 
 - 
Method Detail- 
invokeMethodpublic Object invokeMethod(Object thiz, String name, Object... args) throws ScriptExecutionException - Specified by:
- invokeMethodin interface- Invocable
- Throws:
- ScriptExecutionException
 
 - 
invokeFunctionpublic Object invokeFunction(String name, Object... args) throws ScriptExecutionException - Specified by:
- invokeFunctionin interface- Invocable
- Throws:
- ScriptExecutionException
 
 - 
getInterfacepublic <T> T getInterface(Class<T> clazz) - Specified by:
- getInterfacein interface- Invocable
 
 - 
getInterfacepublic <T> T getInterface(Object thiz, Class<T> clazz) - Specified by:
- getInterfacein interface- Invocable
 
 - 
isDefinedpublic boolean isDefined(String name) Returns true if theScriptEnginehas a definition with the givenname.- Parameters:
- name-
- Returns:
 
 
- 
 
-