jaxrs/src/main/java/de/taimos/dvalin/jaxrs/websocket/ServerJSONWebSocketAdapter.java
/**
     * send object to client and serialize it using JSON<br>
     * uses a generic callback that prints errors to the log
     *
     * @param objectToSend the object to send
     */
send object to client and serialize it using JSON
uses a generic callback that prints errors to the log

@param objectToSend the object to send
send object to client and serialize it using JSON uses a generic callback that prints errors to the log @param objectToSend the object to send
protected final void sendObjectToSocket(final Object objectToSend) {
        this.sendObjectToSocket(objectToSend, new WriteCallback() {
            @Override
            public void writeSuccess() {
                ServerJSONWebSocketAdapter.LOGGER.debug("Send data to socket: {}", objectToSend);
            }
            @Override
            public void writeFailed(Throwable x) {
                ServerJSONWebSocketAdapter.LOGGER.error("Error sending message to socket", x);
            }
        });
    }
protected final void sendObjectToSocket ( final Object objectToSend ) { this . sendObjectToSocket ( objectToSend , new WriteCallback ( ) { @ Override public void writeSuccess ( ) { ServerJSONWebSocketAdapter . LOGGER . debug ( "Send data to socket: {}" , objectToSend ) ; } @ Override public void writeFailed ( Throwable x ) { ServerJSONWebSocketAdapter . LOGGER . error ( "Error sending message to socket" , x ) ; } } ) ; }
send object to client and serialize it using JSON<br>
 uses a generic callback that prints errors to the log
send object to client and serialize it using JSON<br > uses a generic callback that prints errors to the log