Annotation Type MessageReceiver


@Documented @Retention(RUNTIME) @Qualifier @Target({TYPE,METHOD}) public @interface MessageReceiver
This qualifier must be placed on any hk2 descriptor that can receive messages. This includes message receiver classes automatically analyzed by hk2, or any Factory.provide() methods automatically analyzed by hk2 or any user-defined Descriptor who can receive messages
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<?>[]
    A list of message types that this service may receive.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Field Details

  • Element Details

    • value

      @Metadata("org.glassfish.hk2.messaging.messageReceiverTypes") Class<?>[] value
      A list of message types that this service may receive. The default value of an empty array represents any message type. Be warned that if the default value is used that any event being fired will cause the descriptor with this qualifier to get reified (classloaded) which may be expensive. In order to have a more efficient application it is better to fill this value in with all the event types this service might receive
      Returns:
      A list of the classes that might be received as topic messages. If the empty set then this class might receive any topic event
      Default:
      {}