Interface TopicHandler

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface TopicHandler
主题消息处理器(函数式接口)。在中间件后台线程触发,绝不在 MC 主线程。
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    handle(String topic, Object payload)
    处理一条主题消息。
  • Method Details

    • handle

      void handle(String topic, Object payload)
      处理一条主题消息。
      Parameters:
      topic - 主题名
      payload - 业务负载(泛型树)