Annotation Interface MultiverseEventListener
@Target({METHOD,ANNOTATION_TYPE})
@Retention(RUNTIME)
@Documented
@EventListener
public @interface MultiverseEventListener
Annotation that marks a method to receive events originated from different world in the multiverse. This annotation
should only be applied to world-scoped objects.
- Author:
- Manuel Fiorelli
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionClass<?>[]
The event classes that this listener handles.Spring Expression Language (SpEL) attribute used for making the event handling conditional.An optional identifier for the listener, defaulting to the fully-qualified signature of the declaring method (e.g.Class<?>[]
Alias forclasses()
.
-
Element Details
-
value
@AliasFor(annotation=org.springframework.context.event.EventListener.class, attribute="classes") Class<?>[] valueAlias forclasses()
.- Default:
- {}
-
classes
@AliasFor(annotation=org.springframework.context.event.EventListener.class, attribute="classes") Class<?>[] classesThe event classes that this listener handles.If this attribute is specified with a single value, the annotated method may optionally accept a single parameter. However, if this attribute is specified with multiple values, the annotated method must not declare any parameters.
- Default:
- {}
-
condition
@AliasFor(annotation=org.springframework.context.event.EventListener.class, attribute="condition") String conditionSpring Expression Language (SpEL) attribute used for making the event handling conditional.The default is
""
, meaning the event is always handled.- See Also:
-
EventListener.condition()
- Default:
- ""
-
id
@AliasFor(annotation=org.springframework.context.event.EventListener.class, attribute="id") String idAn optional identifier for the listener, defaulting to the fully-qualified signature of the declaring method (e.g. "mypackage.MyClass.myMethod()").- Since:
- 5.3
- See Also:
-
EventListener.id()
TransactionalApplicationListener.getListenerId()
- Default:
- ""
-