Package org.keycloak.scripting
Class InvocableScriptAdapter
java.lang.Object
org.keycloak.scripting.InvocableScriptAdapter
- All Implemented Interfaces:
Invocable
Wraps a
ScriptModel
and makes it Invocable
.- Author:
- Thomas Darimont
-
Constructor Summary
ConstructorDescriptionInvocableScriptAdapter
(ScriptModel scriptModel, ScriptEngine scriptEngine) Creates a newInvocableScriptAdapter
instance. -
Method Summary
Modifier and TypeMethodDescription<T> T
getInterface
(Class<T> clazz) <T> T
getInterface
(Object thiz, Class<T> clazz) invokeFunction
(String name, Object... args) invokeMethod
(Object thiz, String name, Object... args) boolean
Returns true if theScriptEngine
has a definition with the givenname
.
-
Constructor Details
-
InvocableScriptAdapter
Creates a newInvocableScriptAdapter
instance.- Parameters:
scriptModel
- must not be nullscriptEngine
- must not be null
-
-
Method Details
-
invokeMethod
public Object invokeMethod(Object thiz, String name, Object... args) throws ScriptExecutionException - Specified by:
invokeMethod
in interfaceInvocable
- Throws:
ScriptExecutionException
-
invokeFunction
- Specified by:
invokeFunction
in interfaceInvocable
- Throws:
ScriptExecutionException
-
getInterface
- Specified by:
getInterface
in interfaceInvocable
-
getInterface
- Specified by:
getInterface
in interfaceInvocable
-
isDefined
Returns true if theScriptEngine
has a definition with the givenname
.- Parameters:
name
-- Returns:
-