我正在测试OpenDolphin,我设法简单地创建了服务器端,共享端模型。
OpenDolphin版本: 0.8.4
对于客户端,我有JavaFX应用程序。 我用:
制作了登录面板ClientConfiguration的参数是:
String
urlEndpoint UiThreadHandler
(uiThreadHandler ui线程处理程序)//为Dolphin平台创建配置。 // urlendpoint取自ChoiceBox,如(" http://localhost:8080/dolphin")
ClientConfiguration config = new ClientConfiguration(urlEndpoint,Runnable::run);
ClientContextFactory.connect(config).get();
如果我使用Runnable::run
,则客户端会连接,但如果我使用Platform::runLater
(JavaFXConfiguration(urlEndpoint)
实现它的方式)
我收到错误:
Exception in thread "pool-2-thread-1" com.canoo.dolphin.client.ClientInitializationException: com.canoo.dolphin.client.ClientInitializationException: Can not connect to server!
任何线索为什么会发生这种情况?
答案 0 :(得分:0)
直到现在我还没有找到这个问题,因为缺少“Dolphin Platform”标签。
在当前版本的Dolphin平台中,您只需使用“DolphinPlatformApplication”类即可创建应用程序。
你可以在这里找到一个例子: https://github.com/canoo/dolphin-platform/tree/master/platform-examples/todo-example