Package com.sun.faces.cdi
Class HeaderValuesMapProducer
java.lang.Object
com.sun.faces.cdi.HeaderValuesMapProducer
- All Implemented Interfaces:
jakarta.enterprise.context.spi.Contextual<Map<String,String[]>>,jakarta.enterprise.inject.spi.Bean<Map<String,String[]>>,jakarta.enterprise.inject.spi.BeanAttributes<Map<String,String[]>>,jakarta.enterprise.inject.spi.PassivationCapable,Serializable
public class HeaderValuesMapProducer extends Object
The Header values map producer is the CDI producer that allows injection of the header values map using @Inject.
- Since:
- 2.3
- See Also:
ExternalContext.getRequestHeaderValuesMap(), Serialized Form
-
Constructor Summary
Constructors Constructor Description HeaderValuesMapProducer() -
Method Summary
Modifier and Type Method Description protected com.sun.faces.cdi.CdiProducer<Map<String,String[]>>addToId(Object object)protected static <T> Set<T>asSet(T... a)protected com.sun.faces.cdi.CdiProducer<Map<String,String[]>>beanClass(Class<?> beanClass)protected com.sun.faces.cdi.CdiProducer<Map<String,String[]>>beanClassAndType(Class<?> beanClass)Map<String,String[]>create(jakarta.enterprise.context.spi.CreationalContext<Map<String,String[]>> creationalContext)protected com.sun.faces.cdi.CdiProducer<Map<String,String[]>>create(Function<jakarta.enterprise.context.spi.CreationalContext<Map<String,String[]>>,Map<String,String[]>> create)voiddestroy(Map<String,String[]> instance, jakarta.enterprise.context.spi.CreationalContext<Map<String,String[]>> creationalContext)Destroy the instance.Class<?>getBeanClass()StringgetId()Get the ID of this particular instantiation of the producer.Set<jakarta.enterprise.inject.spi.InjectionPoint>getInjectionPoints()Get the injection points.StringgetName()Set<Annotation>getQualifiers()Get the default qualifier.Class<? extends Annotation>getScope()Set<Class<? extends Annotation>>getStereotypes()Get the stereotypes.Set<Type>getTypes()booleanisAlternative()Is this an alternative.booleanisNullable()Is this nullable.protected com.sun.faces.cdi.CdiProducer<Map<String,String[]>>name(String name)protected com.sun.faces.cdi.CdiProducer<Map<String,String[]>>qualifiers(Annotation... qualifiers)protected com.sun.faces.cdi.CdiProducer<Map<String,String[]>>scope(Class<? extends Annotation> scope)protected com.sun.faces.cdi.CdiProducer<Map<String,String[]>>types(Type... types)
-
Constructor Details
-
HeaderValuesMapProducer
public HeaderValuesMapProducer()
-
-
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 interfacejakarta.enterprise.inject.spi.PassivationCapable- Returns:
- the ID of this particular instantiation of the producer
-
getName
- Specified by:
getNamein interfacejakarta.enterprise.inject.spi.BeanAttributes<T>
-
getBeanClass
- Specified by:
getBeanClassin interfacejakarta.enterprise.inject.spi.Bean<T>
-
getTypes
- Specified by:
getTypesin interfacejakarta.enterprise.inject.spi.BeanAttributes<T>
-
getQualifiers
Get the default qualifier.- Specified by:
getQualifiersin interfacejakarta.enterprise.inject.spi.BeanAttributes<T>- Returns:
- the qualifiers, which in the default case only contains the Default
-
getScope
- Specified by:
getScopein interfacejakarta.enterprise.inject.spi.BeanAttributes<T>
-
create
public Map<String,String[]> create(jakarta.enterprise.context.spi.CreationalContext<Map<String,String[]>> creationalContext)- Specified by:
createin interfacejakarta.enterprise.context.spi.Contextual<T>
-
destroy
public void destroy(Map<String,String[]> instance, jakarta.enterprise.context.spi.CreationalContext<Map<String,String[]>> creationalContext)Destroy the instance.Since most artifact that the sub classes are producing are artifacts that the JSF runtime really is managing the destroy method here does not need to do anything.
- Specified by:
destroyin interfacejakarta.enterprise.context.spi.Contextual<T>- Parameters:
instance- the instance.creationalContext- the creational context.
-
getInjectionPoints
Get the injection points.- Specified by:
getInjectionPointsin interfacejakarta.enterprise.inject.spi.Bean<T>- Returns:
- the injection points.
-
getStereotypes
Get the stereotypes.- Specified by:
getStereotypesin interfacejakarta.enterprise.inject.spi.BeanAttributes<T>- Returns:
- the stereotypes.
-
isAlternative
public boolean isAlternative()Is this an alternative.- Specified by:
isAlternativein interfacejakarta.enterprise.inject.spi.BeanAttributes<T>- Returns:
- false.
-
isNullable
public boolean isNullable()Is this nullable.- Specified by:
isNullablein interfacejakarta.enterprise.inject.spi.Bean<T>- Returns:
- false.
-
name
-
create
-
beanClass
-
types
-
beanClassAndType
-
qualifiers
protected com.sun.faces.cdi.CdiProducer<Map<String,String[]>> qualifiers(Annotation... qualifiers) -
scope
protected com.sun.faces.cdi.CdiProducer<Map<String,String[]>> scope(Class<? extends Annotation> scope) -
addToId
-
asSet
-