public enum ThreadMode extends java.lang.Enum<ThreadMode>
EventBus.register(Object)| Enum Constant and Description |
|---|
ASYNC
Subscriber will be called in a separate thread.
|
BACKGROUND
On Android, subscriber will be called in a background thread.
|
MAIN
On Android, subscriber will be called in Android's main thread (UI thread).
|
MAIN_ORDERED
On Android, subscriber will be called in Android's main thread (UI thread).
|
POSTING
Subscriber will be called directly in the same thread, which is posting the event.
|
| Modifier and Type | Method and Description |
|---|---|
static ThreadMode |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ThreadMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ThreadMode POSTING
public static final ThreadMode MAIN
POSTING.public static final ThreadMode MAIN_ORDERED
MAIN,
the event will always be queued for delivery. This ensures that the post call is non-blocking.public static final ThreadMode BACKGROUND
public static final ThreadMode ASYNC
public static ThreadMode[] values()
for (ThreadMode c : ThreadMode.values()) System.out.println(c);
public static ThreadMode valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullAvailable under the Apache License, Version 2.0 - Copyright © 2012-2017 greenrobot.org. All Rights Reserved.