In the new version, the interface has changed significantly. Some notable changes are:
  • All the interaction has become asynchronous. As a consequence, all the error conditions are now received only via callbacks. Synchronous exceptions upon method invocations are possible only in case of wrong parameters.
  • The library now handles the connection lifecycle and attempts automatic retries upon connection errors. Hence, transient problems due to connection issues are now hidden. The library informs the application of its work through a onStatusChange callback.
  • The interaction with the Server uses a different protocol (TLCP). The codes related to the various error conditions are the same, but a few new error cases have been introduced.


For these reasons, there is no direct mapping of exceptions. We assumed that, by refurbishing the application to apply to the new interface, exception handling would also be revised.
If you have a sophisticated exception handling policy and want to keep the logic, here are some notes:
  • If you handled connection issues, you should now lean on the library handling and set the related parameters in ConnectionOptions. You can enforce a custom retry logic by intercepting the onStatusChange callback. We can expand on this point, if needed.
  • Errors issued by the Server are still available. The cases in PushServerException and PushUserException have been merged in the same set, but have been separated based on the context. Now they are available in onServerError, if related to connection establishment, and in onSubscriptionError of the SubscriptionListener, if related to subscription requests.