Package org.jboss.weld.bootstrap.events
Class ProcessProducerImpl<T,X>
- java.lang.Object
-
- org.jboss.weld.bootstrap.events.ContainerEvent
-
- org.jboss.weld.bootstrap.events.AbstractContainerEvent
-
- org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent
-
- org.jboss.weld.bootstrap.events.ProcessProducerImpl<T,X>
-
- All Implemented Interfaces:
ProcessProducer<T,X>,NotificationListener
public class ProcessProducerImpl<T,X> extends AbstractDefinitionContainerEvent implements ProcessProducer<T,X>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ProducerConfigurator<X>configureProducer()Returns aProducerConfiguratorinitialized with theProducerprocessed by this event, to configure a newProducerthat will replace the original one at the end of the observer invocation.protected static <T,X>
voidfire(BeanManagerImpl beanManager, AbstractProducerBean<T,X,Member> bean)AnnotatedMember<T>getAnnotatedMember()Returns theAnnotatedFieldrepresenting the producer field or theAnnotatedMethodrepresenting the producer method.Producer<X>getProducer()Returns theProducerobject that will be used by the container to call the producer method or read the producer field.voidpostNotify(Extension extension)voidsetProducer(Producer<X> producer)Replaces theProducerobject that will be used by the container to call the producer method or read the producer field.-
Methods inherited from class org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent
addDefinitionError, fire
-
Methods inherited from class org.jboss.weld.bootstrap.events.AbstractContainerEvent
getActualTypeArguments, getBeanManager, getErrors, getEventType, getRawType
-
Methods inherited from class org.jboss.weld.bootstrap.events.ContainerEvent
checkWithinObserverNotification, getReceiver, preNotify
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.enterprise.inject.spi.ProcessProducer
addDefinitionError
-
-
-
-
Method Detail
-
fire
protected static <T,X> void fire(BeanManagerImpl beanManager, AbstractProducerBean<T,X,Member> bean)
-
getAnnotatedMember
public AnnotatedMember<T> getAnnotatedMember()
Description copied from interface:ProcessProducerReturns theAnnotatedFieldrepresenting the producer field or theAnnotatedMethodrepresenting the producer method.- Specified by:
getAnnotatedMemberin interfaceProcessProducer<T,X>- Returns:
- the
AnnotatedMemberrepresenting the producer
-
getProducer
public Producer<X> getProducer()
Description copied from interface:ProcessProducerReturns theProducerobject that will be used by the container to call the producer method or read the producer field.- Specified by:
getProducerin interfaceProcessProducer<T,X>- Returns:
- the
Producerinvoker object used by the container
-
setProducer
public void setProducer(Producer<X> producer)
Description copied from interface:ProcessProducerReplaces theProducerobject that will be used by the container to call the producer method or read the producer field.- Specified by:
setProducerin interfaceProcessProducer<T,X>- Parameters:
producer- the newProducerobject to use
-
configureProducer
public ProducerConfigurator<X> configureProducer()
Description copied from interface:ProcessProducerReturns aProducerConfiguratorinitialized with theProducerprocessed by this event, to configure a newProducerthat will replace the original one at the end of the observer invocation.Each call returns the same configurator instance within an observer notification.
- Specified by:
configureProducerin interfaceProcessProducer<T,X>- Returns:
- a non reusable
ProducerConfiguratorto configure the originalProducer.
-
postNotify
public void postNotify(Extension extension)
- Specified by:
postNotifyin interfaceNotificationListener- Overrides:
postNotifyin classContainerEvent
-
-