@POST
    @Produces("application/json")
    public String broadcast(Message message) {
        try {
            Response msg = new Response(message.author, message.message);
            AtmosphereResource r = (AtmosphereResource)req.getAttribute("org.atmosphere.cpr.AtmosphereResource");
            r.getAtmosphereConfig().getBroadcasterFactory().lookup("/cxf-chat").broadcast(mapper.writeValueAsString(msg));
        } catch (JsonProcessingException e) {
            //ignore
        }
        return "";
    }
@ POST @ Produces ( "application/json" ) public String broadcast ( Message message ) { try { Response msg = new Response ( message . author , message . message ) ; AtmosphereResource r = ( AtmosphereResource ) req . getAttribute ( "org.atmosphere.cpr.AtmosphereResource" ) ; r . getAtmosphereConfig ( ) . getBroadcasterFactory ( ) . lookup ( "/cxf-chat" ) . broadcast ( mapper . writeValueAsString ( msg ) ) ; } catch ( JsonProcessingException e ) { } return "" ; }
Broadcast the received message object to all suspended response. Do not write back the message to the calling connection.

@param message a {@link Message}
@return a {@link Response}