Interface Producer<I>

All Superinterfaces:
Aggregate
All Known Implementing Classes:
InterceptingProducer
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Producer<I> extends Aggregate
  • Method Details

    • dispose

      default void dispose(I i, Request<I> r)
    • produce

      default I produce(Request<?> r)
    • produce

      I produce(SequencedSet<? extends Assignment<?>> assignments)
      Produces a new contextual instance and returns it, possibly (often) making use of the supplied, dependent, contextual references.

      Implementations of this method must not call produce(Request) or an infinite loop may result.

      Parameters:
      assignments - a SequencedSet of Assignments this Producer needs to create the contextual instance; must not be null
      Returns:
      a new contextual instance, or null
      Throws:
      NullPointerException - if dependentContextualReferences is null