Skip to content

Commit 716c88f

Browse files
committed
V2.2.0
1 parent 5e1b820 commit 716c88f

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

EventBus/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apply plugin: 'maven'
33
apply plugin: 'signing'
44

55
group = 'de.greenrobot'
6-
version = '2.1.1-SNAPSHOT'
6+
version = '2.2.0'
77
sourceCompatibility = 1.6
88

99
def isSnapshot = version.endsWith('-SNAPSHOT')

README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ EventBus is pushed to [Maven Central](http://search.maven.org/#search%7Cga%7C1%7
2424
Gradle template ([check current version](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22de.greenrobot%22%20AND%20a%3A%22eventbus%22)):
2525
```
2626
dependencies {
27-
compile 'de.greenrobot:eventbus:2.0.2'
27+
compile 'de.greenrobot:eventbus:2.2.0'
2828
}
2929
```
3030
Maven template ([check current version](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22de.greenrobot%22%20AND%20a%3A%22eventbus%22)):
3131
```
3232
<dependency>
3333
<groupId>de.greenrobot</groupId>
3434
<artifactId>eventbus</artifactId>
35-
<version>2.0.2</version>
35+
<version>2.2.0</version>
3636
</dependency>
3737
```
3838

@@ -48,6 +48,16 @@ In EventBus, each event handling method is associated with a thread mode (have a
4848

4949
*Example:* Consider your subscriber updates the UI, but the triggering event is posted by a background thread (using `eventBus.post(event)`). The name of the event handling method should be `onEventMainThread`. EventBus takes care of calling the method in the main thread without any further code required
5050

51+
Subscriber priorities and ordered event delivery
52+
------------------------------------------------
53+
*TODO. For now, this is just the javadoc for the method register(Object subscriber, int priority):*
54+
Like register(Object) with an additional subscriber priority to influence the order of event delivery. Within the same delivery thread (ThreadMode), higher priority subscribers will receive events before others with a lower priority. The default priority is 0. Note: the priority does *NOT* affect the order of delivery among subscribers with different ThreadModes!
55+
56+
Cancelling further event delivery
57+
---------------------------------
58+
*TODO. For now, this is just the javadoc for the method cancelEventDelivery(Object event):*
59+
Called from a subscriber's event handling method, further event delivery will be canceled. Subsequent subscribers won't receive the event. Events are usually canceled by higher priority subscribers (see register(Object, int)). Canceling is restricted to event handling methods running in posting thread ThreadMode.PostThread.
60+
5161
Sticky Events
5262
-------------
5363
Some events carry information that is of interest after the event is posted. For example, this could be an event signalizing that some initialization is complete. Or if you have some sensor or location data and you want to hold on the most recent values. Instead of implementing your own caching, you can use sticky events. EventBus keeps the last sticky event of a certain type in memory. The sticky event can be delivered to subscribers or queried explicitly. Thus, you don't need any special logic to consider already available data.
@@ -60,7 +70,7 @@ Additional Features and Notes
6070
* **NOT based on annotations:** Querying annotations are slow on Android, especially before Android 4.0. Have a look at this [Android bug report](http://code.google.com/p/android/issues/detail?id=7811)
6171
* **Based on conventions:** Event handling methods are called "onEvent" (you could supply different names, but this is not encouraged).
6272
* **Performanced optimized:** It's probably the fastest event bus for Android.
63-
* **Tiny:** The jar is less than 30 KBytes.
73+
* **Tiny:** The jar is less than 50 KBytes.
6474
* **Convenience singleton:** You can get a process wide event bus instance by calling EventBus.getDefault(). You can still call new EventBus() to create any number of local busses.
6575
* **Subscriber and event inheritance:** Event handler methods may be defined in super classes, and events are posted to handlers of the event's super classes including any implemented interfaces. For example, subscriber may register to events of the type Object to receive all events posted on the event bus.
6676
* **Selective registration:** It's possible to register only for specific event types. This also allows subscribers to register only some of their event handling methods for main thread event delivery.
@@ -180,9 +190,9 @@ FAQ
180190

181191
Release History
182192
---------------
183-
### V2.2.0 (future release) Feature release, subscriber priority
193+
### V2.2.0 (2013-11-18) Feature release, subscriber priority
184194
* Register subscribers with a priority to to influence the order of event delivery (per delivery thread)
185-
* Event delivery can be aborted by subscribers so subsequent subscribers will not receive the event
195+
* Event delivery can be canceled by subscribers so subsequent subscribers will not receive the event
186196
* Added "isRegistered" and "removeAllStickyEvents" methods
187197
* Deprecated registration methods with custom method names and event class filters
188198
* Starting with EventBus 2.2 we enforced methods to be public

0 commit comments

Comments
 (0)