Interface ConsumerRegistry<T>

Type Parameters:
T - the consumed type
All Superinterfaces:
Consumer<T>, Registrar<Consumer<T>>

public interface ConsumerRegistry<T> extends Registrar<Consumer<T>>, Consumer<T>
A registry of consumers.
Author:
Paul Ferraro
  • Method Details

    • newInstance

      static <T> ConsumerRegistry<T> newInstance()
      Creates a new consumer registry.
      Type Parameters:
      T - the consumed type
      Returns:
      a new consumer registry.
    • newInstance

      static <T> ConsumerRegistry<T> newInstance(Supplier<Collection<Consumer<T>>> factory)
      Creates a new consumer registry.
      Type Parameters:
      T - the consumed type
      Parameters:
      factory - the consumer collection factory
      Returns:
      a new consumer registry.