dolphin-platform
dolphin-platform copied to clipboard
React on communication on a background thread
Currently the ClientDolphin provides the following method:
void send(String commandName, OnFinishedHandler onFinished = null)
By using this method the OnFinishedHandler is always called on the UI thread. Since this is great for mostly all use cases there are some special cases that need a different handling. Currently the biggest problem is a logout method in JavaFX that will be called on the Application.stop() method. By doing so the OnFinishedHandler
will never be called since JavaFX has already stopped. For this special type we need a callback in a background thread. Maybe the send methods can return CompletableFuture<Void>
.
PR https://github.com/canoo/dolphin-platform/pull/356 prepares the code base for this change
PR https://github.com/canoo/dolphin-platform/pull/358 prepares the code base for this change