Salut,

first, I apology if there is some documentation I could have read on the topic. Just point me to the proper location if that exist.

I'm the lead/creator of Atmosphere, a Comet/Websocket Framework:

    https://github.com/Atmosphere/atmosphere

Atmosphere has several entries point, and one of them is a REST based module. What the module offer is new set of annotation to add support for Comet based transaction (ya, it's totally opposite of REST...but still fun).

   http://is.gd/gIciG

Currently Atmosphere support Jersey, but I would also like to support Wink. Mainly, I would like to be able to do:

    /**
     * Inject a {...@link Broadcaster} based on @Path
     */
    private @PathParam("topic") Broadcaster topic;

    /**
     * Suspend the response, and register a {...@link 
AtmosphereResourceEventListener}
     * that get notified when events occurs like client disconnection, broadcast
     * or when the response get resumed.
     *
     * @return A {...@link Broadcastable} used to broadcast events.
     */
    @GET
    @Suspend(listeners = {EventsLogger.class})
    public Broadcastable subscribe() {
        return new Broadcastable(topic);
    }

In short, I need to learn how I can extend Wink in order to:

 (1) process the Atmosphere's annotation
(2) Intercept the Resource's response in order to take the appropriate Atmosphere action.

As an example, here is how I do it in Jersey:

  http://is.gd/gIfNI

Please let me know if that's doable or not. I already able to support Wink by injecting the HttpServletRequest and retrieving Atmosphere's object from there, but it is not as simple as the snippet above.

Thanks!

-- Jeanfrancois


Reply via email to