public void registerProducer(ExchangeEventProducer<T> producer) throws IllegalStateException, NullPointerException { if (disruptor == null) { throw new IllegalStateException("disruptor == null, call init"); } if (producer == null) { throw new NullPointerException("consumer == null"); } producer.setRingBuffer(disruptor.getRingBuffer()); producers.add(producer); }