public void sendMessage ( final String message ) { if ( userSession == null ) { logger . error ( "Unable to send message, user session is null" ) ; return ; } if ( userSession . getAsyncRemote ( ) == null ) { logger . error ( "Unable to send message, async remote is null" ) ; return ; } userSession . getAsyncRemote ( ) . sendText ( message ) ; }
Send a new message to the server