public void send ( String data ) throws UnsupportedEncodingException { log . trace ( "send message: {}" , data ) ; // process the incoming string if ( StringUtils . isNotBlank ( data ) ) { send ( Packet . build ( data . getBytes ( "UTF8" ) , MessageType . TEXT ) ) ; } else { throw new UnsupportedEncodingException ( "Cannot send a null string" ) ; } }
Sends text to the client .