@Target(value=METHOD)
@Retention(value=RUNTIME)
public static @interface Events.Background
Method marked with this annotation will receive events on background thread.
Method must also be marked with Events.Subscribe
annotation.
If singleThread()
set to true
then only one thread will be used to
execute this method. All other events targeting this method will wait until it is finished.
Note: method executed in background should be static to not leek object reference
(i.e. Activity reference). To subscribe static methods use Events.register(Object)
method with Class
object.
Modifier and Type | Optional Element and Description |
---|---|
boolean |
singleThread |