Class LifecycleFactoryImpl
- All Implemented Interfaces:
FacesWrapper<LifecycleFactory>
public class LifecycleFactoryImpl extends LifecycleFactory
- See Also:
LifecycleFactory
-
Field Summary
Fields Modifier and Type Field Description protected ConcurrentHashMap<String,Lifecycle>
lifecycleMap
-
Constructor Summary
Constructors Constructor Description LifecycleFactoryImpl()
-
Method Summary
Modifier and Type Method Description void
addLifecycle(String lifecycleId, Lifecycle lifecycle)
Register a newLifecycle
instance, associated with the specifiedlifecycleId
, to be supported by thisLifecycleFactory
.Lifecycle
getLifecycle(String lifecycleId)
Create (if needed) and return aLifecycle
instance for the specified lifecycle identifier.Iterator<String>
getLifecycleIds()
Return anIterator
over the set of lifecycle identifiers supported by this factory.
-
Field Details
-
Constructor Details
-
LifecycleFactoryImpl
public LifecycleFactoryImpl()
-
-
Method Details
-
addLifecycle
Description copied from class:LifecycleFactory
Register a new
Lifecycle
instance, associated with the specifiedlifecycleId
, to be supported by thisLifecycleFactory
. This method may be called at any time, and makes the correspondingLifecycle
instance available throughout the remaining lifetime of this web application.- Specified by:
addLifecycle
in classLifecycleFactory
- Parameters:
lifecycleId
- Identifier of the newLifecycle
lifecycle
-Lifecycle
instance that we are registering
-
getLifecycle
Description copied from class:LifecycleFactory
Create (if needed) and return a
Lifecycle
instance for the specified lifecycle identifier. The set of available lifecycle identifiers is available via thegetLifecycleIds()
method.Each call to
getLifecycle()
for the samelifecycleId
, from within the same web application, must return the sameLifecycle
instance.- Specified by:
getLifecycle
in classLifecycleFactory
- Parameters:
lifecycleId
- Lifecycle identifier of the requestedLifecycle
instance- Returns:
- the
Lifecycle
instance - Throws:
FacesException
-
getLifecycleIds
Description copied from class:LifecycleFactory
Return an
Iterator
over the set of lifecycle identifiers supported by this factory. This set must include the value specified byLifecycleFactory.DEFAULT_LIFECYCLE
.- Specified by:
getLifecycleIds
in classLifecycleFactory
- Returns:
- an
Iterator
over the set of lifecycle identifiers supported by this factory
-