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 ProducerConfigurator
can configure a Producer
. 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
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondisposeWith
(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 Details
-
produceWith
Set a callback to produce a new instance.- Type Parameters:
U
- instance type- Parameters:
callback
- aFunction
defining the callback to set- Returns:
- self
- See Also:
-
disposeWith
Set a callback to destroy the produced instance.- Parameters:
callback
- aConsumer
defining the callback to set- Returns:
- self
- See Also:
-