https://greenrobot.org/release/eventbus-3-1-plain-java-support/ Open Source by greenrobot Logo [ ] * EventBus + Features + Documentation o How to get started o Delivery Threads (ThreadMode) o Configuration o Sticky Events o Priorities and Event Cancellation o Subscriber Index o ProGuard o AsyncExecutor o FAQ o EventBus 3.0.x Java Docs o EventBus 2.4.x Java Docs + License + Changelog * greenDAO + Features + Documentation o ObjectBox DaoCompat o greenDAO 3 o How to get started o Introduction o Modelling entities o Sessions o Queries o Joins o Relations o Custom Types o Database Encryption o Technical FAQ o Non-technical FAQ o JavaDoc (API Reference) + Changelog * Essentials + Features o Essentials hash functions o Hash Comparison + Changelog * ObjectBox * Contact/Support + Jobs * Blog * Menu EventBus 3.1 with plain Java support [eventbus-3-1]With over 25% of the top Android apps using it, EventBus is more popular than ever before. So we're very happy to announce EventBus 3.1 today. Starting with this release, EventBus works with plain Java (non-Android) projects. This has two major benefits: Firstly, it opens up EventBus for all Java developers and makes it usable for server and desktop applications. Secondly, it allows Android developers to use EventBus in local unit tests. Before, you had to use instrumentation tests which are slow and require a device. In contrast to this, plain Java unit tests are blazingly fast as they run directly on your desktop machine. The second improvement is a new thread mode: MAIN_ORDERED. It is a variation of the default MAIN thread mode and also ensures event delivery in the main thread. The difference is when an event is posted in the main thread: with MAIN it will pass on the event to subscribers immediately in a synchronous fashion. MAIN_ORDERED will only enqueue the event in the call to post(...) for later delivery to subscribers. This gives event processing a stricter and more consistent order (thus the name MAIN_ORDERED). For example if you post another event in an event handler with MAIN thread mode, the second event handler will finish before the first one (because it is called synchronously - compare it to a method call). With MAIN_ORDERED, the first event handler would finish, and then the second one will be invoked at a later point in time (as soon as the main thread has capacity). We are considering making MAIN_ORDERED the default in a future version of EventBus. Because MAIN and MAIN_ORDERED behave slightly different, there may be some cases where this also may change an app's behavior. It's a trade off in every case: MAIN is faster when events are posted on the main thread and MAIN_ORDERED offers more consistent and predictable event delivery. Let us know what you think about it. One more thing: we would love to get some feedback on EventBus and how we can further improve it. Our feedback form takes only a minute. Thank you! Spread the love * 4 * * * * * 1 * * * * Posted in Release and tagged EventBus, main thread, Multithreading, plain Java, thread mode. Post navigation - Introducing DaoCompat: greenDAO on ObjectBox EventBus 3.2 with incremental annotation... - 3 Comments 1. [faeb3f] William Ferguson November 7, 2017 at 3:12 pm Great stuff guys. Plain Java support and MAIN_ORDERED are the two best things you could have done to improve EventBus. Thank you! 2. [537e3e] jp1017 November 8, 2017 at 12:34 am Good job. 3. [a96a90] Ray Li November 8, 2017 at 4:01 pm Amazing work! EventBus is life When will we see a MAIN_ORDERED for postSticky()? This feature is SOO needed. Currently, the limit of 1 sticky event requires creative workarounds. Thanks for everything! Comments are closed. ObjectBox Database & Sync Store and sync your objects. Learn more... GitHub Links EventBus, greenDAO, Essentials, ObjectBox Latest News * Mobile databases: SQLite and SQLite alternatives for Android and iOS * EventBus 3.2 with incremental annotation processing * EventBus 3.1 with plain Java support * Introducing DaoCompat: greenDAO on ObjectBox * ObjectBox is a Techstars'17 company Recent Comments * Ray Li on EventBus 3.1 with plain Java support * jp1017 on EventBus 3.1 with plain Java support * William Ferguson on EventBus 3.1 with plain Java support * DaoMaster on Introducing DaoCompat: greenDAO on ObjectBox * Morten Slott Hansen on Introducing DaoCompat: greenDAO on ObjectBox Tags ActiveAndroid Active Entities Android 2.3 Android 4.0 Annotations Benchmark beta DaoSession DbFlow eager loading Encryption EventBus Gradle greenDAO greenrobot-common Ice Cream Sandwich Identity Scope index indices JavaDocs Joins Keep Sections LazyList lazy loading Maven Maven Central mobile database Multithreading NoSQL ObjectBox Open Source ORM OrmLite perfmatters Performance Query QueryBuilder Reflection Release Requery SQLCipher SQLite String PK To-Many To-One greenrobot Open Source Libraries: EventBus, greenDAO, greenrobot Common. (c) Copyright 2020 greenrobot. All rights reserved. Impressum --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- Check out ObjectBox - the fast & easy database for Android by the developers of EventBus and greenDAO Learn more now