JavaFX桌面应用程序 - 与web服务的套接字通信 [英] JavaFX desktop application - socket communication with web serivce

查看:216
本文介绍了JavaFX桌面应用程序 - 与web服务的套接字通信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想开发一个具有实时数据刷新功能的简单桌面应用程序(在多个客户端上)。是否有可能开发一个这样的应用程序,通过套接字与Web服务进行通信?

I want to develop a simple desktop application with real-time data refresh (on multiple clients). Is it possible to develop an application such as this that communicates with web service over sockets?

这是我想知道的:


  • 执行此操作的基本步骤是什么?

  • 是否可以使用Spring WebSocket执行此操作?

  • 任何代码示例?

推荐答案

是的,你绝对可以使用Spring WebSocket用于多个客户端上的实时数据刷新。

当然,客户端和服务器都应该支持WebSocket协议。

如需快速入门,请查看以下内容:

http://spring.io/guides/gs/messaging-stomp-websocket/

http://start.spring.io/

Yes, you can definitely use Spring WebSocket for real-time data refresh on multiple clients.
Of course, both client and server should support the WebSocket protocol.
For quick start, take a look at the followed:
http://spring.io/guides/gs/messaging-stomp-websocket/
http://start.spring.io/

供服务器和客户端的完整参考选项请看这里: http:// docs .spring.io / spring / docs / current / spring-framework-reference / html / websocket.html

特别是,它提供了何时使用它的简短讨论: http:/ /docs.spring.io/spring/docs/current/spring-framework-reference/html/websocket.html#websocket-intro-when-to-use

For full reference of both server and client options take a look here: http://docs.spring.io/spring/docs/current/spring-framework-reference/html/websocket.html
In particular, it provides a short discussion on when to use it: http://docs.spring.io/spring/docs/current/spring-framework-reference/html/websocket.html#websocket-intro-when-to-use

这篇关于JavaFX桌面应用程序 - 与web服务的套接字通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆