Annotation Interface EventTopic


@Qualifier @Documented @Target({FIELD,PARAMETER}) @Retention(RUNTIME) public @interface EventTopic
This annotation can be applied to arguments and fields that want to receive notifications on the specified event topic.

Normally EventTopic annotations will be marked as optional. Those annotations establish a link rather then provide a value at the time of injection.

Example usage:

   public class Car {
     @Inject
     void handle(@Optional @EventTopic("org/eclipse/e4/some/event/topic") Payload payload);
     ...
   }
 

The value stored under the event's "org.eclipse.e4.data" property is injected unless the class of the injected variable is org.osgi.service.event.Event. In that case the whole event object is injected.

Since:
0.16
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
     
  • Element Details

    • value

      String value
      Default:
      ""