public void rawLine(String line){
  checkArgument(StringUtils.isNotBlank(line),"Cannot send empty line to server: '%s'",line);
  checkArgument(bot.isConnected(),"Not connected to server");
  writeLock.lock();
  try {
    long curNanos=System.nanoTime();
    while (lastSentLine + delayNanos > curNanos) {
      writeNowCondition.await(lastSentLine + delayNanos - curNanos,TimeUnit.NANOSECONDS);
      curNanos=System.nanoTime();
    }
    log.info(OUTPUT_MARKER,line);
    Utils.sendRawLineToServer(bot,line);
    lastSentLine=System.nanoTime();
  }
 catch (  IOException e) {
    throw new RuntimeException("IO exception when sending line to server, is the network still up? " + exceptionDebug(),e);
  }
catch (  InterruptedException e) {
    throw new RuntimeException("Couldn't pause thread for message delay. " + exceptionDebug(),e);
  }
catch (  Exception e) {
    throw new RuntimeException("Could not send line to server. " + exceptionDebug(),e);
  }
 finally {
    writeLock.unlock();
  }
}

public void rawLine ( String line ) { checkArgument ( StringUtils . isNotBlank ( line ) , "Cannot send empty line to server: '%s'" , line ) ; checkArgument ( bot . isConnected ( ) , "Not connected to server" ) ; writeLock . lock ( ) ; try { long curNanos = System . nanoTime ( ) ; while ( lastSentLine + delayNanos > curNanos ) { writeNowCondition . await ( lastSentLine + delayNanos - curNanos , TimeUnit . NANOSECONDS ) ; curNanos = System . nanoTime ( ) ; } log . info ( OUTPUT_MARKER , line ) ; Utils . sendRawLineToServer ( bot , line ) ; lastSentLine = System . nanoTime ( ) ; } catch ( IOException e ) { throw new RuntimeException ( "IO exception when sending line to server, is the network still up? " + exceptionDebug ( ) , e ) ; } catch ( InterruptedException e ) { throw new RuntimeException ( "Couldn't pause thread for message delay. " + exceptionDebug ( ) , e ) ; } catch ( Exception e ) { throw new RuntimeException ( "Could not send line to server. " + exceptionDebug ( ) , e ) ; } finally { writeLock . unlock ( ) ; } }
sends a raw line through the outgoing message queue .
