public Message pollBufferedMessage(){
  Message message=buffer.get(buffer.size() - 1);
  buffer.remove(buffer.size() - 1);
  return message;
}

public Message pollBufferedMessage ( ) { Message message = buffer . get ( buffer . size ( ) - 1 ) ; buffer . remove ( buffer . size ( ) - 1 ) ; return message ; }
get last buffered message
