- All Known Implementing Classes:
PolyglotExecutor
public interface ScriptExecutor
-
Method Summary
Modifier and TypeMethodDescriptionstatic ExecutorService
<T> T
Evaluates the specified code.default <T> void
eval
(String pSource, Map<String, Object> pVarMap, Class<T> pResultType, BiConsumer<T, Exception> pResultConsumer) Evaluates the specified code.<T> void
eval
(String pSource, Map<String, Object> pVarMap, Class<T> pResultType, BiConsumer<T, Exception> pResultConsumer, long pTimeoutMs) Evaluates the specified code.default <T> T
Evaluates the specified code thread-safely.default <T> T
Evaluates the specified code thread-safely.default String
-
Method Details
-
createSingleThreadExecutorService
-
createSingleThreadExecutor
-
getLanguage
Language getLanguage() -
getLanguageId
-
getExecutor
-
evalSafe
Evaluates the specified code thread-safely. -
evalSafe
Evaluates the specified code thread-safely. -
eval
Evaluates the specified code. -
eval
default <T> void eval(String pSource, Map<String, Object> pVarMap, Class<T> pResultType, BiConsumer<T, Exception> pResultConsumer) Evaluates the specified code.- Parameters:
pVarMap
- A map containing variables with values to pass to guest code execution. The map should be thread-safe.
-
eval
<T> void eval(String pSource, Map<String, Object> pVarMap, Class<T> pResultType, BiConsumer<T, Exception> pResultConsumer, long pTimeoutMs) Evaluates the specified code.- Parameters:
pVarMap
- A map containing variables with values to pass to guest code execution. The map should be thread-safe.
-