public static HttpURLConnection peekMessages ( final URI uri , final QueueRequestOptions queueOptions , final OperationContext opContext , final int numberOfMessages ) throws URISyntaxException , IOException , StorageException { final UriQueryBuilder builder = new UriQueryBuilder ( ) ; builder . add ( PEEK_ONLY , "true" ) ; if ( numberOfMessages != 0 ) { builder . add ( NUMBER_OF_MESSAGES , Integer . toString ( numberOfMessages ) ) ; } final HttpURLConnection request = BaseRequest . createURLConnection ( uri , queueOptions , builder , opContext ) ; request . setRequestMethod ( Constants . HTTP_GET ) ; return request ; }
Constructs a web request to retrieve a specified number of messages from the front of the queue without changing their visibility . Sign the web request with a length of - 1L .