code: @Override
    public T nextEvent() {
      if (producedEvents >= maxEvents) {
        return null;
      }
      T event = createNextEvent();
      producedEvents++;
      return event;
    }
docs: (non-Javadoc)
  
  @see com.sematext.ag.source.Source#nextEvent()