java.lang.Object
com.sun.faces.cdi.RequestProducer
- All Implemented Interfaces:
Contextual<Object>,Bean<Object>,BeanAttributes<Object>,PassivationCapable,Serializable
The RequestProducer is the CDI producer that allows EL resolving of #{request}
- Since:
- 2.3
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected com.sun.faces.cdi.CdiProducer<Object> create(CreationalContext<Object> creationalContext) Create a new instance of the contextual type.protected com.sun.faces.cdi.CdiProducer<Object> create(Function<CreationalContext<Object>, Object> create) voiddestroy(Object instance, CreationalContext<Object> creationalContext) Destroy the instance.Class<?> The bean class of the managed bean or session bean or of the bean that declares the producer method or field.getId()Get the ID of this particular instantiation of the producer.Get the injection points.getName()Obtains the EL name of a bean, if it has one.Get the default qualifier.Class<? extends Annotation> getScope()Obtains the scope of the bean.Set<Class<? extends Annotation>> Get the stereotypes.getTypes()Obtains the bean types of the bean.booleanIs this an alternative.booleanprotected com.sun.faces.cdi.CdiProducer<Object> protected com.sun.faces.cdi.CdiProducer<Object> qualifiers(Annotation... qualifiers) protected com.sun.faces.cdi.CdiProducer<Object> scope(Class<? extends Annotation> scope) protected com.sun.faces.cdi.CdiProducer<Object>
-
Constructor Details
-
RequestProducer
public RequestProducer()
-
-
Method Details
-
getId
Get the ID of this particular instantiation of the producer.This is an implementation detail of CDI, where it wants to relocate a particular producer in order to re-inject a value. This is typically used in combination with passivation. Note that this is NOT about the value we're producing, but about the producer itself.
- Specified by:
getIdin interfacePassivationCapable- Returns:
- the ID of this particular instantiation of the producer
-
getName
Description copied from interface:BeanAttributesObtains the EL name of a bean, if it has one.- Specified by:
getNamein interfaceBeanAttributes<T>- Returns:
- the EL name
-
getBeanClass
-
getTypes
Description copied from interface:BeanAttributesObtains the bean types of the bean.- Specified by:
getTypesin interfaceBeanAttributes<T>- Returns:
- the bean types
-
getQualifiers
Get the default qualifier.- Specified by:
getQualifiersin interfaceBeanAttributes<T>- Returns:
- the qualifiers, which in the default case only contains the Default
-
getScope
Description copied from interface:BeanAttributesObtains the scope of the bean.- Specified by:
getScopein interfaceBeanAttributes<T>- Returns:
- the scope
-
create
Description copied from interface:ContextualCreate a new instance of the contextual type. Instances should use the givenCreationalContextwhen obtaining contextual references to inject, in order to ensure that any dependent objects are associated with the contextual instance that is being created. An implementation may callCreationalContext.push(Object)between instantiation and injection to help the container minimize the use of client proxy objects.- Specified by:
createin interfaceContextual<T>- Parameters:
creationalContext- the context in which this instance is being created- Returns:
- the contextual instance
-
destroy
Destroy the instance.Since most artifact that the sub classes are producing are artifacts that the Faces runtime really is managing the destroy method here does not need to do anything.
- Specified by:
destroyin interfaceContextual<T>- Parameters:
instance- the instance.creationalContext- the creational context.
-
getInjectionPoints
Get the injection points.- Specified by:
getInjectionPointsin interfaceBean<T>- Returns:
- the injection points.
-
getStereotypes
Get the stereotypes.- Specified by:
getStereotypesin interfaceBeanAttributes<T>- Returns:
- the stereotypes.
-
isAlternative
public boolean isAlternative()Is this an alternative.- Specified by:
isAlternativein interfaceBeanAttributes<T>- Returns:
- false.
-
isNullable
public boolean isNullable() -
name
-
create
protected com.sun.faces.cdi.CdiProducer<Object> create(Function<CreationalContext<Object>, Object> create) -
types
-
qualifiers
-
scope
-
addToId
-