public void sendMessage ( String messageToSendParam ) { if ( this . userSession == null ) { throw new FluidClientException ( "User Session is not set. Check if connection is open." , FluidClientException . ErrorCode . IO_ERROR ) ; } RemoteEndpoint . Async asyncRemote = null ; if ( ( asyncRemote = this . userSession . getAsyncRemote ( ) ) == null ) { throw new FluidClientException ( "Remote Session is not set. Check if connection is open." , FluidClientException . ErrorCode . IO_ERROR ) ; } asyncRemote . sendText ( messageToSendParam ) ; }
Send a message as text .