public AmqpMessage receive(long timeout,TimeUnit unit) throws Exception {
  checkClosed();
  return prefetch.poll(timeout,unit);
}

public AmqpMessage receive ( long timeout , TimeUnit unit ) throws Exception { checkClosed ( ) ; return prefetch . poll ( timeout , unit ) ; }
attempts to receive a message sent to this receiver , waiting for the given timeout value before giving up and returning null .
