接口 Function<I,​O>

  • 函数接口:
    这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。

    @Public
    @Stable
    @FunctionalInterface
    public interface Function<I,​O>
    This is the core interface of the function api. The process is called for every message of the input topic of the function. The incoming input bytes are converted to the input type I for simple Java types(String, Integer, Boolean, Map, and List types) and for org.Json type. If this serialization approach does not meet your needs, you can use the byte stream handler defined in RawRequestHandler.
    • 方法详细资料

      • process

        O process​(I input,
                  Context context)
           throws java.lang.Exception
        Process the input.
        返回:
        the output
        抛出:
        java.lang.Exception