protected void consumeMessage(Message message,List<Message> messageList){
  if (verbose) {
    LOG.info("Received message: " + message);
  }
  messageList.add(message);
  if (messageList.size() >= data.length) {
synchronized (lock) {
      lock.notifyAll();
    }
  }
}

protected void consumeMessage ( Message message , List < Message > messageList ) { if ( verbose ) { LOG . info ( "Received message: " + message ) ; } messageList . add ( message ) ; if ( messageList . size ( ) >= data . length ) { synchronized ( lock ) { lock . notifyAll ( ) ; } } }
consumes a received message .
