Annotation Interface EventSubscription


@Target(METHOD) @Retention(RUNTIME) public @interface EventSubscription
Annotation for methods that serve as subscribers to the engine's events. Methods annotated with @EventSubscription will be called in response to each event specified by the method's argument. Annotated methods must adhere to the following constraints:
  • Must be public.
  • Must be void.
  • Must have exactly one argument of a type that exactly matches one of the ContextEvent sub-interfaces.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Indicates whether the subscription should be asynchronous.
  • Element Details

    • async

      boolean async
      Indicates whether the subscription should be asynchronous.
      Returns:
      true if the subscription is asynchronous, false otherwise.
      Default:
      false