Class ProducerConfiguratorImpl<T>
- java.lang.Object
-
- org.jboss.weld.bootstrap.events.configurator.ProducerConfiguratorImpl<T>
-
- Type Parameters:
T-
- All Implemented Interfaces:
ProducerConfigurator<T>,Configurator<Producer<T>>
public class ProducerConfiguratorImpl<T> extends Object implements ProducerConfigurator<T>, Configurator<Producer<T>>
- Author:
- Martin Kouba
-
-
Constructor Summary
Constructors Constructor Description ProducerConfiguratorImpl(Producer<T> producer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Producer<T>complete()Returns a finished component.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
public <U extends T> ProducerConfigurator<T> produceWith(Function<CreationalContext<U>,U> callback)
Description copied from interface:ProducerConfiguratorSet a callback to produce a new instance.- Specified by:
produceWithin interfaceProducerConfigurator<T>- Parameters:
callback- aFunctiondefining the callback to set- Returns:
- self
- See Also:
Producer.produce(CreationalContext)
-
disposeWith
public ProducerConfigurator<T> disposeWith(Consumer<T> callback)
Description copied from interface:ProducerConfiguratorSet a callback to destroy the produced instance.- Specified by:
disposeWithin interfaceProducerConfigurator<T>- Parameters:
callback- aConsumerdefining the callback to set- Returns:
- self
- See Also:
Producer.dispose(Object)
-
complete
public Producer<T> complete()
Description copied from interface:ConfiguratorReturns a finished component.- Specified by:
completein interfaceConfigurator<T>- Returns:
- a finished component
-
-