You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EmiteEventBus is based on HandlerManager, which has been deprecated for some time and meant to be used only for widget events.
The new general purpose EventBus system in GWT 2.3+ is cleaner and faster.
I have been working on this through the weekend, and I made some other changes to the API as I implemented it. Here's the branch: https://github.com/xose/emite/tree/events
Changes to the Event system:
Emite is now using the new, general purpose EventBus from com.google.web.bindery.event.*, instead of the old and deprecated HandlerManager.
There is now a single EventBus handling all the events for Emite.
The EventBus is now injected via GIN, with a Named("emite") annotation.
Event handling happens on the class itself, instead of using anonymous classes for handlers. This is cleaner, and allows for easy testing (events can be sent directly to the class, instead of through the EventBus)
Handler interfaces have been moved inside the Event classes for clarity.
Event classes that are only used from a single package have been moved to that package.
Some events have been renamed or split (example: MessageHandler -> MessageReceived/MessageSent)
Other API changes and updates:
Classes with static final Strings have been converted to enums.
ChatManager is now using generics. This saves a lot of type conversions and offers a cleaner API.
ChatManager is now just a base interface for PairChatManager and RoomChatManager. Code using ChatManager should probably change it to PairChatManager.
IQHandler has been renamed as IQCallback, to prevent confusion with the IQReceived Handler.
Room Subject support has been merged into Room.
Some internal classes with long useless hierarchies have been merged.
Many classes, mostly internal, have been renamed for consistency.
Spelling fixes, like isSucceed -> isSuccess.
Note: This is still work in progress! Changes in src/main are almost complete, and I'm already using them successfully, but not all the tests and examples have been converted yet. To be done:
Fix the remaining tests and examples. Build with -Dmaven.test.skip=true for now.
There are some naming conflicts that might cause trouble, like two "chat states" that have different purposes.
SessionComponentsRegistry can probably be removed and replaced with GIN.
Update Hablar to the new API.
It's not ready to pull into the main branch yet, but some input/comments would be welcome.
The text was updated successfully, but these errors were encountered:
EmiteEventBus is based on HandlerManager, which has been deprecated for some time and meant to be used only for widget events.
The new general purpose EventBus system in GWT 2.3+ is cleaner and faster.
I have been working on this through the weekend, and I made some other changes to the API as I implemented it. Here's the branch: https://github.com/xose/emite/tree/events
Changes to the Event system:
Other API changes and updates:
Note: This is still work in progress! Changes in src/main are almost complete, and I'm already using them successfully, but not all the tests and examples have been converted yet. To be done:
It's not ready to pull into the main branch yet, but some input/comments would be welcome.
The text was updated successfully, but these errors were encountered: