【发布时间】:2014-05-14 13:27:39
【问题描述】:
我想在 websocket 连接之间共享一些信息。共享数据有点复杂,所以我不能使用EndpointConfig.getUserProperties()。我想扩展ServerEndpointConfig.Configurator 并添加我自己的数据结构。(我不想覆盖其他方法,例如getEndpointInstance)。问题是我应该使用线程安全的数据结构吗?或者我可以使用任何数据结构,并且 Web 套接字容器将保证我的 ServerEndpointConfig.Configurator 实例将以安全的方式被访问。
【问题讨论】:
标签: java multithreading jakarta-ee websocket tyrus