Annotation Interface Subscribe


@Retention(RUNTIME) @Target(METHOD) public @interface Subscribe
Annotated methods are automatically discovered and subscribed by EventBus.subscribeAnnotated(Object).
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    int
    Maximum number of executions until the subscription expires.
    Values less than 1 mean the subscription will never expire.
    boolean
    Whether cancelled events should be handled or ignored by the annotated method.
    int
     
  • Element Details

    • priority

      int priority
      See Also:
      Default:
      0
    • ignoreCancelled

      boolean ignoreCancelled
      Whether cancelled events should be handled or ignored by the annotated method.
      Default:
      true
    • expirationCount

      int expirationCount
      Maximum number of executions until the subscription expires.
      Values less than 1 mean the subscription will never expire.
      Default:
      0