Class GraalPyRuntimeUtil.AsyncMemberAdapter
java.lang.Object
io.micronaut.context.python.GraalPyRuntimeUtil.AsyncMemberAdapter
- Enclosing class:
GraalPyRuntimeUtil
Adapter invoked from Python async member facades.
- Since:
- 5.2.0
- Author:
- Micronaut Team
-
Method Summary
Modifier and TypeMethodDescription@Nullable ObjectAdapt host values returned from Java members to values Python async code can consume.@Nullable org.graalvm.polyglot.ValueadaptAwaitable(org.graalvm.polyglot.Context context, @Nullable Object value) Adapt a host async value returned from a Java member to a Python awaitable.
-
Method Details
-
adapt
-
adaptAwaitable
public @Nullable org.graalvm.polyglot.Value adaptAwaitable(org.graalvm.polyglot.Context context, @Nullable Object value) Adapt a host async value returned from a Java member to a Python awaitable.- Parameters:
context- The target Python context.value- The host value.- Returns:
- The adapted Python awaitable, or null when the value is not async.
-