Package org.glassfish.hk2.api.messaging
Annotation Type MessageReceiver
-
@Documented @Retention(RUNTIME) @Qualifier @Target({TYPE,METHOD}) public @interface MessageReceiverThis qualifier must be placed on any hk2 descriptor that can receive messages. This includes message receiver classes automatically analyzed by hk2, or anyFactory.provide()methods automatically analyzed by hk2 or any user-definedDescriptorwho can receive messages
-
-
Field Summary
Fields Modifier and Type Fields Description static java.lang.StringEVENT_RECEIVER_TYPES
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.Class<?>[]valueA list of message types that this service may receive.
-
-
-
Element Detail
-
value
@Metadata("org.glassfish.hk2.messaging.messageReceiverTypes") java.lang.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:
- {}
-
-