Top Description Methods
com.google.common.eventbus

public @Interface Subscribe

extends Annotation
Annotations
@Retention:RUNTIME
@Target:METHOD
@ElementTypesAreNonnullByDefault
Imports
java.lang.annotation.ElementType, .Retention, .RetentionPolicy, .Target

Marks a method as an event subscriber.

The type of event will be indicated by the method's first (and only) parameter, which cannot be primitive. If this annotation is applied to methods with zero parameters, or more than one parameter, the object containing the method will not be able to register for event delivery from the EventBus.

Unless also annotated with @AllowConcurrentEvents, event subscriber methods will be invoked serially by each event bus that they are registered with.

Author
Cliff Biffle
Since
10.0

Method Summary

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString