- Fix reconnection issue, when using multiple connection methods per session.
- Improve and fix stanza acknowledging and Stream Management
- Add Delayed Delivery (XEP-0203) extension to stanzas, which are resent automatically later (when reconnected again)
- Always resent all unacknowledged stanzas after login, not only after stream resumption.
- Highlight StreamManagement’s request / answer pairs in VisualDebugger.
- Update XEP-0198 Stream Management to version 1.5 (respect the ‘h’ attribute in the failed element)
- Wait for the roster response before sending initial presence during login, to prevent receiving presence information from yet unknown contacts.
- Make sure asynchronous method calls do not block (affected only few methods for avatars and entity capabilities)
- Use the hostname instead of the domain for SASL clients (i.e. use the Sasl.createSaslClient API correctly as per the documentation, may affect DIGEST-MD5 authentication).
- Call SaslClient.dispose() when SASL authentication has completed.
- Include the requesting IQ in NoResponseException, when doing IQ queries.
- XEP-0184: Add the sender of a receipt to the MessageDeliveryEvent.
- Allow event consumption for outbound stanzas, which prevents the stanza to be sent.
- Make stream feature negotiation more stable.
- Minor graphical fixes in VisualDebugger.
- Add API to include the hash and mime type in File Transfer offers.
- Add API to create a chat session with a thread id.
- Immediately complete (IQ-)queries if sending failed and don’t wait on the timeout.
Friday, September 9, 2016
Version 0.7.2 Released
Thursday, August 11, 2016
Babbler 0.7.1 (Bugfix) Released
Here's the changelog:
- Discovering services should not fail immediately if one sub-query fails.
- Make sure abnormal WebSocket disconnections trigger the reconnection.
- Make sure
RECONNECTION_SUCCEEDEDevent is triggered for external components. - Add listeners to listen for successful or failed send operations.
- Add public constructor for the SASL challenge class.
- Add public constructors to SASL Failure class.
- Make sure to not write
XMLConstants.XML_NS_URIto XML elements (FasterXML Aalto’s XMLStreamWriter implementation writes it) - Add
DataForm.Field#getValue()and implementtoString()method. - Add convenient API to compare two MUC affiliations and roles (i.e.
Affiliation.OWNER.isHigherThan(Affiliation.ADMIN)) - Compare presences of MUC occupants in the Occupant’s Comparable implementation.
- Minor performance improvement by using a
ListIteratorin collection based result sets. - Discover PubSub services by identity, not by feature name (it’s more reliable)
- Add
nextPage()andpreviousPage()method and refine the naming of other methods in result set management (e.g. havingforCount()andforItemCount()was confusing)
Sunday, June 5, 2016
Babbler Version 0.7.0 Released
As always you can find the artifacts in Maven Central:
<dependency> <groupId>rocks.xmpp</groupId> <artifactId>xmpp-core-client</artifactId> <version>0.7.0</version> </dependency> <dependency> <groupId>rocks.xmpp</groupId> <artifactId>xmpp-extensions-client</artifactId> <version>0.7.0</version> </dependency>
Release highlights are support for WebSocket connection, the new XMPP Address Format (RFC 7395), asynchronous API for IQ queries and XEP-0198: Stream Management (which is still a bit experimental).
Some API has also been revised for less ambigious and easier usage, e.g. timeouts are now represented by java.time.Duration instead of a int/long (which somtimes were seconds, sometimes milliseconds) and the xml:lang attribute is now represented by java.util.Locale instead of String to prevent improper usage.
- Add support for XEP-0198: Stream Management
- Add support for WebSocket connection method (RFC 7395).
- Update Jid class to the new XMPP Address Format (RFC 7622)
- IQ queries can now be executed asynchronously (non-blocking) using Java 8’s
java.util.concurrent.CompletableFutureAPI. - Represent
xml:langattributes asjava.util.Locale, not asString. - Represent timeouts as
java.time.Durationinstead ofint/longfor better clearness. - Add a very minimalistic DNS resolver for resolving SRV and TXT records in order to remove the dependency to com.sun.* classes.
- Add more
ReconnectionStrategyimplementations. - Check connected state of socket before connecting (to prevent
SocketExceptionwhen aSocketFactoryprovides a connected socket) - Add
XmppSession#isAuthenticated()method. - Add static
XmppSession#addCreationListener()method to allow to listen for newly created sessions. - Update XEP-0080 to version 1.9 (add altaccuracy element).
- Add API to destroy a MUC room without a reason.
- More documentation, e.g. clarify the use of
ConnectionConfiguration#secure() - Don’t include an empty body in Message Delivery Receipts.
- Add correct XML names to component namespace stanzas.
- Eagerly release unused port to prevent ports-leaks due to delayed GC
- Improve thread-safety during
connect()and login() - Fix encoding issues, caused by missing UTF-8 encoding, mainly in the debugger.
- XEP-0033: Address should have extensions.
- Add workaround for a JDK bug causing memory issues and high CPU.
- Add documentation for custom SASL authentication.
Sunday, January 3, 2016
Precis (RFC 7564/7613) - A Java Implementation
- RFC 7564: PRECIS Framework: Preparation, Enforcement, and Comparison of Internationalized Strings in Application Protocols
- RFC 7613: Preparation, Enforcement, and Comparison of Internationalized Strings Representing Usernames and Passwords
- RFC 7700: Preparation, Enforcement, and Comparison of Internationalized Strings Representing Nicknames
These are also used by XMPP, especially by the new Address Format specification, RFC 7622 (The local and resource part must conform to Precis profiles).
After working on a Java implementation for Precis for some time, I'd finally like to announce the first release of the open source software, which supports all of the three Precis specifications:
Project site with more informationMaven coordinates:
<dependency> <groupId>rocks.xmpp</groupId> <artifactId>precis</artifactId> <version>0.1.0</version> </dependency>
Anybody who likes to upgrade the obsolete Libidn's Stringprep class is invited to give it a try.
Sunday, September 13, 2015
XMPP.rocks: Babbler Version 0.6.1 released
This is primarily a bug fix release, which addresses some issues which were recently discovered and improves things here and there. It is compatible to version 0.6.0.
For detailed release notes, you can find the changelog here.
Thursday, August 13, 2015
Babbler Version 0.6.0
This version is an important milestone because it’s the first version which is written solely for Java 8!
In particular that means, it leverages many of the new Java 8 goodies, most notably the new Date/Time API, Functional Interfaces (e.g. Predicate) and Lambda Expressions and paves the way for future improvements (e.g. Stream API) to keep the library modern.
The legacy Date API (java.util.Date/Calendar/TimeZone) has been replaced by the new java.time package, i.e. Instant, OffsetDateTime and ZoneOffset.
Event Listeners have been replaced by java.util.function.Consumer, which really saved a lot of similar interfaces and thanks to lambdas there isn’t even a syntactical difference.
New Features
A special release highlight is the support for the Jabber Component Protocol, which allows you to write External Components for an XMPP server. So the library isn’t exclusively usable for client development anymore, but now also for server component development! More about that in a future blog post.Further new features are:
- XEP-0171: Language Translation
- XEP-0301: In-Band Real Time Text (I’ve blogged about it recently)
- XEP-0319: Last User Interaction in Presence
The updated documentation can be found here.
Support for XEP-0198: Stream Management is nearly done, but still needs some polishing, so it’s postponed to the next version.
Thanks for everybody who provided feedback and bug reports! I’m happy to hear more from you!
Wednesday, July 8, 2015
XMPP Real-time Text in Action
It shows how it could look like when two XMPP contacts are chatting with each other and having real-time text enabled. Enjoy!
Roughly speaking you have to create a new outbound real-time message and just update its text while typing:
// Create a chat session with another user. Chat chat = xmppClient.getManager(ChatManager.class).createChatSession(contact); RealTimeTextManager realTimeTextManager = xmppClient.getManager(RealTimeTextManager.class); // Create an new RTT message. OutboundRealTimeMessage realTimeMessage = realTimeTextManager.createRealTimeMessage(chat); TextArea textArea = new TextArea(); textArea.textProperty().addListener((observable, oldValue, newValue) -> { realTimeMessage.update(newValue); });
When done typing, commit the message (which will send the current message as normal chat message):
realTimeMessage.commit();
On the receiver side, you can listen for it like this (and e.g. display it to a Label).
Label label = new Label(); // Upon receiving a RTT message, display it. realTimeTextManager.addRealTimeMessageListener(e -> { InboundRealTimeMessage rtt = e.getRealTimeMessage(); rtt.addRealTimeTextChangeListener(e1 -> Platform.runLater(() -> label.setText(e1.getText()))); });