public class Events
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
Events.Background
Method marked with this annotation will receive events on background thread.
|
static interface |
Events.Cache
Method marked with this annotation will use new instance of given
CacheProvider
class to handle results caching. |
static interface |
Events.Failure
Method marked with this annotation will receive failure callbacks for events
with specified key on main thread.
|
static interface |
Events.Result
Method marked with this annotation will receive results for events
with specified key on main thread.
Result can be accessed either directly as method's parameter or through EventResult object. |
static interface |
Events.Status
Method marked with this annotation will receive status updates for events
with specified key on main thread.
EventStatus.STARTED status will be sent before any subscribed method is executed
(right after event is posted to the bus) and for all newly registered events receivers
if execution of all subscribed methods is no yet finished.
EventStatus.FINISHED status will be sent after all subscribed methods
(including background) are executed.
|
static interface |
Events.Subscribe
Method marked with this annotation will receive events with specified key on main thread.
|
Constructor and Description |
---|
Events() |
Modifier and Type | Method and Description |
---|---|
static Event.Builder |
create(java.lang.String eventKey) |
static void |
init(android.content.Context context)
Initializes event bus
|
static Event |
post(java.lang.String eventKey) |
static void |
register(java.lang.Object target) |
static void |
setDebug(boolean isDebug) |
static void |
unregister(java.lang.Object target) |
public static void init(android.content.Context context)
public static void setDebug(boolean isDebug)
public static void register(java.lang.Object target)
public static void unregister(java.lang.Object target)
public static Event.Builder create(java.lang.String eventKey)
public static Event post(java.lang.String eventKey)