基本上我已经阅读了一些示例,但所有示例都独立包含在一个 servlet 中。 如:使用doGet建立长轮询连接,然后使用doPost触发事件通知所有挂起的连接。
这是我的问题:我在 spring mvc 中有其他 Web 操作编程,在 spring mvc Controller 中,用户通过/message/post 发布消息,我怎样才能使此操作触发 Atmosphere 处理程序以通知挂起的连接?
最佳答案
But what about non web components (EJB, JMS, Akka/Scala Actor, etc.) or web component with different scope (another web application, another Servlet, etc.)? They can also generate server sides events by using Atmosphere’s BroadcasterFactory
关于java - 如何触发 Atmosphere 中其他框架( cometd )的通知?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3068078/