code: public SIMPIterator getReceivedMessageIterator(int maxMsgs)
    {
      List receivedMessages = new LinkedList();
      Iterator<MessageItem> streamMessages = 
        _targetStream.getAllMessagesOnStream().iterator();
      boolean allMsgs = (maxMsgs == SIMPConstants.SIMPCONTROL_RETURN_ALL_MESSAGES);
      int index = 0;
      while((allMsgs || (index < maxMsgs)) && streamMessages.hasNext())
      {
        MessageItem msgItem = (MessageItem)streamMessages.next();
  
        SIMPReceivedMessageControllable receivedMessage =
          new LinkReceivedMessageControl(msgItem, _tsm.getDestinationHandler().getMessageProcessor(), _tsm.getDestinationHandler());
        receivedMessages.add(receivedMessage);
        index++;
      }
      return new BasicSIMPIterator(receivedMessages.iterator());
    }
docs: /* (non-Javadoc)
  @see com.ibm.ws.sib.processor.runtime.SIMPDeliveryStreamReceiverControllable#getQueuedMessageIterator