Class GraalPyRuntimeUtil.AsyncMemberAdapter

java.lang.Object
io.micronaut.context.python.GraalPyRuntimeUtil.AsyncMemberAdapter
Enclosing class:
GraalPyRuntimeUtil

public static final class GraalPyRuntimeUtil.AsyncMemberAdapter extends Object
Adapter invoked from Python async member facades.
Since:
5.2.0
Author:
Micronaut Team
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable Object
    adapt(org.graalvm.polyglot.Context context, @Nullable Object value)
    Adapt host values returned from Java members to values Python async code can consume.
    @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.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • adapt

      public @Nullable Object adapt(org.graalvm.polyglot.Context context, @Nullable Object value)
      Adapt host values returned from Java members to values Python async code can consume.
      Parameters:
      context - The target Python context.
      value - The host value.
      Returns:
      The adapted value.
    • 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.