@Override public void onMessage(Message message){
synchronized (messages) {
    messages.add(message);
    if (verbose) {
      LOG.info("Received: " + message);
    }
    messages.notifyAll();
  }
}

@ Override public void onMessage ( Message message ) { synchronized ( messages ) { messages . add ( message ) ; if ( verbose ) { LOG . info ( "Received: " + message ) ; } messages . notifyAll ( ) ; } }
method implemented from messagelistener interface .
