Interface ProducerConfigurator<T>
- 
- Type Parameters:
- T- The return type of the producer method or the type of the producer field
 
 public interface ProducerConfigurator<T>A ProducerConfiguratorcan configure aProducer. The container must provide an implementation of this interface.This configurator is not thread safe and shall not be used concurrently. CDI Lite implementations are not required to provide support for Portable Extensions. - Since:
- 2.0
- Author:
- Martin Kouba
- See Also:
- ProcessProducer.configureProducer()
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description ProducerConfigurator<T>disposeWith(Consumer<T> callback)Set a callback to destroy the produced instance.<U extends T>
 ProducerConfigurator<T>produceWith(Function<CreationalContext<U>,U> callback)Set a callback to produce a new instance.
 
- 
- 
- 
Method Detail- 
produceWith<U extends T> ProducerConfigurator<T> produceWith(Function<CreationalContext<U>,U> callback) Set a callback to produce a new instance.- Type Parameters:
- U- instance type
- Parameters:
- callback- a- Functiondefining the callback to set
- Returns:
- self
- See Also:
- Producer.produce(CreationalContext)
 
 - 
disposeWithProducerConfigurator<T> disposeWith(Consumer<T> callback) Set a callback to destroy the produced instance.- Parameters:
- callback- a- Consumerdefining the callback to set
- Returns:
- self
- See Also:
- Producer.dispose(Object)
 
 
- 
 
-