Atmosphere + Jersey: How do I have multiple broadcasters?

后端 未结 2 597
误落风尘
误落风尘 2021-01-03 08:05

I have a working Jersey/Atmosphere/Guice application which has two Atmosphere Resources. The first is pretty much a clone of the example chat application:



        
2条回答
  •  孤城傲影
    2021-01-03 08:24

    Just inject Broadcaster using the @PathParam annotation:

    private
    @PathParam("topic")
    Broadcaster topic;
    

    You can also use the @Context annotation. Hope that help.

    -- Jeanfrancois

提交回复
热议问题