Annotation Type Subscribe


  • @Retention(RUNTIME)
    @Target(METHOD)
    public @interface Subscribe
    An annotation that indicates that this method can be used to listen for an event from the proxy.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      boolean async
      Whether the handler is required to be called asynchronously.
      short order
      The order events will be posted to this handler.
    • Element Detail

      • order

        short order
        The order events will be posted to this handler.
        Returns:
        the order
        Default:
        0
      • async

        boolean async
        Whether the handler is required to be called asynchronously.

        If this method returns true, the method is guaranteed to be executed asynchronously from the current thread. Otherwise, the handler may be executed on the current thread or asynchronously.

        If any method handler targeting an event type is marked with true, then every handler targeting that event type will be executed asynchronously.

        Returns:
        Requires async
        Default:
        false